config/default.yml in rubocop-rspec-2.0.0.pre vs config/default.yml in rubocop-rspec-2.0.0

- old
+ new

@@ -1,16 +1,87 @@ --- -AllCops: - RSpec: - Patterns: - - _spec.rb - - "(?:^|/)spec/" - RSpec/FactoryBot: - Patterns: - - spec/factories.rb - - spec/factories/**/*.rb - - features/support/factories/**/*.rb +RSpec: + Include: + - "**/*_spec.rb" + - "**/spec/**/*" + Language: + ExampleGroups: + Regular: + - describe + - context + - feature + - example_group + Skipped: + - xdescribe + - xcontext + - xfeature + Focused: + - fdescribe + - fcontext + - ffeature + Examples: + Regular: + - it + - specify + - example + - scenario + - its + Focused: + - fit + - fspecify + - fexample + - fscenario + - focus + Skipped: + - xit + - xspecify + - xexample + - xscenario + - skip + Pending: + - pending + Expectations: + - expect + - is_expected + - expect_any_instance_of + Helpers: + - let + - let! + Hooks: + - prepend_before + - before + - append_before + - around + - prepend_after + - after + - append_after + HookScopes: + - each + - example + - context + - all + - suite + Includes: + Examples: + - it_behaves_like + - it_should_behave_like + - include_examples + Context: + - include_context + Runners: + - to + - to_not + - not_to + SharedGroups: + Examples: + - shared_examples + - shared_examples_for + Context: + - shared_context + Subjects: + - subject + - subject! RSpec/AlignLeftLetBrace: Description: Checks that left braces for adjacent single line lets are aligned. Enabled: false VersionAdded: '1.16' @@ -134,12 +205,12 @@ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect RSpec/EmptyExampleGroup: Description: Checks if an example group does not include any tests. Enabled: true - CustomIncludeMethods: [] VersionAdded: '1.7' + VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup RSpec/EmptyHook: Description: Checks for empty before and after hooks. Enabled: true @@ -239,10 +310,13 @@ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput RSpec/FilePath: Description: Checks that spec file paths are consistent and well-formed. Enabled: true + Include: + - "**/*_spec*rb*" + - "**/spec/**/*" CustomTransform: RuboCop: rubocop RSpec: rspec IgnoreMethods: false SpecSuffixOnly: false @@ -313,16 +387,10 @@ AssignmentOnly: false VersionAdded: '1.0' 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 EnforcedStyle: it_behaves_like SupportedStyles: @@ -559,11 +627,11 @@ VersionChanged: '1.10' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain RSpec/StubbedMock: Description: Checks that message expectations do not have a configured response. - Enabled: pending + Enabled: true VersionAdded: '1.44' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock RSpec/SubjectStub: Description: Checks for stubbed test subjects. @@ -643,17 +711,27 @@ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher RSpec/FactoryBot/AttributeDefinedStatically: Description: Always declare attribute values as blocks. Enabled: true + Include: + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb VersionAdded: '1.28' VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically RSpec/FactoryBot/CreateList: Description: Checks for create_list usage. Enabled: true + Include: + - "**/*_spec.rb" + - "**/spec/**/*" + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb EnforcedStyle: create_list SupportedStyles: - create_list - n_times VersionAdded: '1.25' @@ -661,9 +739,13 @@ StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList RSpec/FactoryBot/FactoryClassName: Description: Use string value when setting the class attribute explicitly. Enabled: true + Include: + - spec/factories.rb + - spec/factories/**/*.rb + - features/support/factories/**/*.rb VersionAdded: '1.37' VersionChanged: '2.0' StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName RSpec/Rails/HttpStatus: