Skip to content

Commit

Permalink
Chore[rubocop]: Fix offenses in spec/slither/section_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeGarciaxyz committed Oct 13, 2023
1 parent c72671d commit f030f55
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions spec/slither/section_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end.to raise_error(Slither::DuplicateColumnNameError)
end

it "should allow duplicate column names that are reserved (i.e. spacer)" do
it "allow duplicate column names that are reserved (i.e. spacer)" do
subject.spacer(10)

expect do
Expand Down Expand Up @@ -82,15 +82,15 @@
trap = subject.instance_variable_get(:@trap)

expect(trap).to be_a(Proc)
expect(trap.call(4)).to eq(true)
expect(trap.call(4)).to be(true)
end
end

it "should try to match a line using the trap" do
it "try to match a line using the trap" do
subject.trap { |line| line == "hello" }

expect(subject.match("hello")).to eq(true)
expect(subject.match("goodbye")).to eq(false)
expect(subject.match("hello")).to be(true)
expect(subject.match("goodbye")).to be(false)
end
end

Expand All @@ -102,8 +102,8 @@
context "when template does not exist" do
it "raise an error if the template is not found on the definition" do
expect do
subject.template(:none).to raise_error(ArgumentError)
end
subject.template(:none).to
end.to raise_error(ArgumentError)
end
end

Expand Down Expand Up @@ -136,7 +136,7 @@
end

describe "#format" do
let(:data) { { id: 3, name: "Ryan"} }
let(:data) { { id: 3, name: "Ryan" } }

it "transform the 'data' hash to the expected format based on the columns width" do
subject.column(:id, 5)
Expand Down Expand Up @@ -198,6 +198,4 @@
end
end
end


end

0 comments on commit f030f55

Please sign in to comment.