Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retire RSpec/InvalidPredicateMatcher #940

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.