Skip to content

Commit

Permalink
Merge pull request rubocop#937 from rubocop-hq/predicate-matcher-fix-…
Browse files Browse the repository at this point in the history
…doc-mistake

Fix mistake in RSpec/PredicateMatcher doc
  • Loading branch information
bquorning committed Jun 18, 2020
2 parents d8d2ce8 + ebc9f9d commit fad3387
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
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
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 fad3387

Please sign in to comment.