Skip to content

Commit

Permalink
Merge pull request #1706 from rubocop/clarify-eq-cop-documentation
Browse files Browse the repository at this point in the history
Docs: Avoid confusion with be_truthy, etc.
  • Loading branch information
bquorning authored Sep 4, 2023
2 parents 86a1f33 + 60c0644 commit 041b1e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_rspec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1483,10 +1483,10 @@ Use `eq` instead of `be ==` to compare objects.
[source,ruby]
----
# bad
expect(foo).to be == true
expect(foo).to be == 42
# good
expect(foo).to eq true
expect(foo).to eq 42
----

=== References
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rspec/eq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ module RSpec
#
# @example
# # bad
# expect(foo).to be == true
# expect(foo).to be == 42
#
# # good
# expect(foo).to eq true
# expect(foo).to eq 42
#
class Eq < Base
extend AutoCorrector
Expand Down

0 comments on commit 041b1e6

Please sign in to comment.