Skip to content

Commit

Permalink
Fix mistake in RSpec/PredicateMatcher doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Jun 17, 2020
1 parent d8d2ce8 commit ebc9f9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rspec/predicate_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ def replacement_matcher(node)
# expect(foo).to be_something
#
# # also good - It checks "true" strictly.
# expect(foo).to be(true)
# expect(foo.something?).to be(true)
#
# @example Strict: false, EnforcedStyle: inflected
# # bad
# expect(foo.something?).to be_truthy
# expect(foo).to be(true)
# expect(foo.something?).to be(true)
#
# # good
# expect(foo).to be_something
Expand Down
4 changes: 2 additions & 2 deletions manual/cops_rspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2452,14 +2452,14 @@ expect(foo.something?).to be_truthy
expect(foo).to be_something

# also good - It checks "true" strictly.
expect(foo).to be(true)
expect(foo.something?).to be(true)
```
#### Strict: false, EnforcedStyle: inflected

```ruby
# bad
expect(foo.something?).to be_truthy
expect(foo).to be(true)
expect(foo.something?).to be(true)

# good
expect(foo).to be_something
Expand Down

0 comments on commit ebc9f9d

Please sign in to comment.