config/default.yml in rubocop-rspec-2.13.2 vs config/default.yml in rubocop-rspec-2.14.0
- old
+ new
@@ -192,11 +192,11 @@
RSpec/ChangeByZero:
Description: Prefer negated matchers over `to change.by(0)`.
Enabled: pending
VersionAdded: '2.11'
- VersionChanged: '2.13'
+ VersionChanged: '2.14'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
NegatedMatcher: ~
RSpec/ClassCheck:
Description: Enforces consistent use of `be_a` or `be_kind_of`.
@@ -381,12 +381,14 @@
be: is
BE: IS
have: has
HAVE: HAS
IgnoredWords: []
+ DisallowedExamples:
+ - works
VersionAdded: '1.0'
- VersionChanged: '1.2'
+ VersionChanged: '2.13'
StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
RSpec/ExpectActual:
Description: Checks for `expect(...)` calls containing literal values.
@@ -490,12 +492,13 @@
EnforcedStyle: single_line_only
SupportedStyles:
- single_line_only
- single_statement_only
- disallow
+ - require_implicit
VersionAdded: '1.29'
- VersionChanged: '1.30'
+ VersionChanged: '2.13'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
RSpec/InstanceSpy:
Description: Checks for `instance_double` used with `have_received`.
Enabled: true
@@ -638,11 +641,15 @@
RSpec/NoExpectationExample:
Description: Checks if an example contains any expectation.
Enabled: pending
Safe: false
VersionAdded: '2.13'
+ VersionChanged: '2.14'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample
+ AllowedPatterns:
+ - "^expect_"
+ - "^assert_"
RSpec/NotToNot:
Description: Checks for consistent method usage for negating expectations.
Enabled: true
EnforcedStyle: not_to
@@ -761,10 +768,16 @@
Enabled: true
VersionAdded: '1.9'
VersionChanged: '1.10'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
+RSpec/SortMetadata:
+ Description: Sort RSpec metadata alphabetically.
+ Enabled: pending
+ VersionAdded: '2.14'
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata
+
RSpec/StubbedMock:
Description: Checks that message expectations do not have a configured response.
Enabled: true
VersionAdded: '1.44'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock
@@ -805,11 +818,10 @@
EnforcedStyle: snake_case
SupportedStyles:
- snake_case
- camelCase
AllowedPatterns: []
- IgnoredPatterns: []
VersionAdded: '1.40'
VersionChanged: '2.13'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName
RSpec/VerifiedDoubleReference:
@@ -864,10 +876,26 @@
EnabledMethods: []
VersionAdded: '1.17'
VersionChanged: '2.0'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
+RSpec/Capybara/NegationMatcher:
+ Description: Enforces use of `have_no_*` or `not_to` for negated expectations.
+ Enabled: pending
+ VersionAdded: '2.14'
+ EnforcedStyle: not_to
+ SupportedStyles:
+ - have_no
+ - not_to
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/NegationMatcher
+
+RSpec/Capybara/SpecificActions:
+ Description: Checks for there is a more specific actions offered by Capybara.
+ Enabled: pending
+ VersionAdded: '2.14'
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificActions
+
RSpec/Capybara/SpecificFinders:
Description: Checks if there is a more specific finder offered by Capybara.
Enabled: pending
VersionAdded: '2.13'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificFinders
@@ -899,10 +927,20 @@
- features/support/factories/**/*.rb
VersionAdded: '1.28'
VersionChanged: '2.0'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
+RSpec/FactoryBot/ConsistentParenthesesStyle:
+ Description: Use a consistent style for parentheses in factory bot calls.
+ Enabled: pending
+ EnforcedStyle: require_parentheses
+ SupportedStyles:
+ - require_parentheses
+ - omit_parentheses
+ VersionAdded: '2.14'
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/ConsistentParenthesesStyle
+
RSpec/FactoryBot/CreateList:
Description: Checks for create_list usage.
Enabled: true
Include:
- "**/*_spec.rb"
@@ -951,9 +989,32 @@
Description: Checks that tests use `have_http_status` instead of equality matchers.
Enabled: pending
SafeAutoCorrect: false
VersionAdded: '2.12'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HaveHttpStatus
+
+RSpec/Rails/InferredSpecType:
+ Description: Identifies redundant spec type.
+ Enabled: pending
+ Safe: false
+ VersionAdded: '2.14'
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/InferredSpecType
+ Inferences:
+ channels: channel
+ controllers: controller
+ features: feature
+ generator: generator
+ helpers: helper
+ jobs: job
+ mailboxes: mailbox
+ mailers: mailer
+ models: model
+ requests: request
+ integration: request
+ api: request
+ routing: routing
+ system: system
+ views: view
RSpec/Rails/HttpStatus:
Description: Enforces use of symbolic or numeric value to describe HTTP status.
Enabled: true
EnforcedStyle: symbolic