Skip to content

Commit

Permalink
Retire RSpec/InvalidPredicateMatcher
Browse files Browse the repository at this point in the history
Fixes #938
  • Loading branch information
pirj committed Nov 2, 2020
1 parent c84faea commit 65c6894
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 120 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Master (Unreleased)

* Remove deprecated class `::RuboCop::Cop::RSpec::Cop`. ([@bquorning][])
* Retire `RSpec/InvalidPredicateMatcher` cop. ([@pirj][])

## 2.0.0.pre (2020-10-22)

Expand Down
6 changes: 0 additions & 6 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,6 @@ RSpec/InstanceVariable:
VersionChanged: '1.7'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable

RSpec/InvalidPredicateMatcher:
Description: Checks invalid usage for predicate matcher.
Enabled: true
VersionAdded: '1.16'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher

RSpec/ItBehavesLike:
Description: Checks that only one `it_behaves_like` style is used.
Enabled: true
Expand Down
1 change: 0 additions & 1 deletion docs/modules/ROOT/pages/cops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* xref:cops_rspec.adoc#rspecimplicitsubject[RSpec/ImplicitSubject]
* xref:cops_rspec.adoc#rspecinstancespy[RSpec/InstanceSpy]
* xref:cops_rspec.adoc#rspecinstancevariable[RSpec/InstanceVariable]
* xref:cops_rspec.adoc#rspecinvalidpredicatematcher[RSpec/InvalidPredicateMatcher]
* xref:cops_rspec.adoc#rspecitbehaveslike[RSpec/ItBehavesLike]
* xref:cops_rspec.adoc#rspeciteratedexpectation[RSpec/IteratedExpectation]
* xref:cops_rspec.adoc#rspecleadingsubject[RSpec/LeadingSubject]
Expand Down
32 changes: 0 additions & 32 deletions docs/modules/ROOT/pages/cops_rspec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1984,38 +1984,6 @@ end

* https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable

== RSpec/InvalidPredicateMatcher

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

| Enabled
| Yes
| No
| 1.16
| -
|===

Checks invalid usage for predicate matcher.

Predicate matcher does not need a question.
This cop checks an unnecessary question in predicate matcher.

=== Examples

[source,ruby]
----
# bad
expect(foo).to be_something?
# good
expect(foo).to be_something
----

=== References

* https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher

== RSpec/ItBehavesLike

|===
Expand Down
41 changes: 0 additions & 41 deletions lib/rubocop/cop/rspec/invalid_predicate_matcher.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/rubocop/cop/rspec_cops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
require_relative 'rspec/implicit_subject'
require_relative 'rspec/instance_spy'
require_relative 'rspec/instance_variable'
require_relative 'rspec/invalid_predicate_matcher'
require_relative 'rspec/it_behaves_like'
require_relative 'rspec/iterated_expectation'
require_relative 'rspec/leading_subject'
Expand Down
39 changes: 0 additions & 39 deletions spec/rubocop/cop/rspec/invalid_predicate_matcher_spec.rb

This file was deleted.

0 comments on commit 65c6894

Please sign in to comment.