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

@@ -116,7 +116,7 @@ describe ProposalNotification do
it "returns true when the proposal is available" do
notification = create(:notification, notifiable: notifiable)
expect(notification.notifiable_available?).to be(true)
expect(notification.notifiable_available?).to be true
end
it "returns false when the proposal is not available" do
@@ -124,7 +124,7 @@ describe ProposalNotification do
notifiable.proposal.destroy!
expect(notification.notifiable_available?).to be(false)
expect(notification.notifiable_available?).to be false
end
end
@@ -132,21 +132,21 @@ describe ProposalNotification do
it "returns true if the resource is present, not hidden, nor retired" do
notification = create(:notification, notifiable: notifiable)
expect(notification.check_availability(proposal)).to be(true)
expect(notification.check_availability(proposal)).to be true
end
it "returns false if the resource is not present" do
notification = create(:notification, notifiable: notifiable)
notifiable.proposal.really_destroy!
expect(notification.check_availability(proposal)).to be(false)
expect(notification.check_availability(proposal)).to be false
end
it "returns false if the resource is hidden" do
notification = create(:notification, notifiable: notifiable)
notifiable.proposal.hide
expect(notification.check_availability(proposal)).to be(false)
expect(notification.check_availability(proposal)).to be false
end
it "returns false if the resource is retired" do
@@ -155,7 +155,7 @@ describe ProposalNotification do
notifiable.proposal.update!(retired_at: Time.current,
retired_explanation: "Unfeasible reason explanation",
retired_reason: "unfeasible")
expect(notification.check_availability(proposal)).to be(false)
expect(notification.check_availability(proposal)).to be false
end
end