Add and apply RSpec/BeEq rubocop rule

This rule was added in rubocop-rspec 2.9.0. Once again, we were applying
it about 50% of the time.
This commit is contained in:
Javi Martín
2023-08-29 19:14:49 +02:00
parent 6268ae9274
commit f79a21f071
31 changed files with 213 additions and 210 deletions

View File

@@ -5,21 +5,21 @@ describe ApplicationHelper do
it "is true if user is the author" do
user = create(:user)
proposal = create(:proposal, author: user)
expect(author_of?(proposal, user)).to eq true
expect(author_of?(proposal, user)).to be true
end
it "is false if user is not the author" do
user = create(:user)
proposal = create(:proposal)
expect(author_of?(proposal, user)).to eq false
expect(author_of?(proposal, user)).to be false
end
it "is false if user or authorable is nil" do
user = create(:user)
proposal = create(:proposal)
expect(author_of?(nil, user)).to eq false
expect(author_of?(proposal, nil)).to eq false
expect(author_of?(nil, user)).to be false
expect(author_of?(proposal, nil)).to be false
end
end
end