config/default.yml in rubocop-rspec-1.6.0 vs config/default.yml in rubocop-rspec-1.7.0

- old
+ new

@@ -1,67 +1,130 @@ +--- +AllCops: + RSpec: + Patterns: + - _spec.rb + - "(?:^|/)spec/" + RSpec/AnyInstance: - Description: 'Check that instances are not being stubbed globally' + Description: Check that instances are not being stubbed globally. Enabled: true +RSpec/BeEql: + Description: Check for expectations where `be(...)` can replace `eql(...)`. + Enabled: true + +RSpec/HookArgument: + Description: Checks the arguments passed to `before`, `around`, and `after`. + Enabled: true + EnforcedStyle: implicit + SupportedStyles: + - implicit + - each + - example + RSpec/DescribeClass: - Description: 'Check that the first argument to the top level describe is the tested class or module.' + Description: Check that the first argument to the top level describe is a constant. Enabled: true RSpec/DescribedClass: - Description: 'Use `described_class` for tested class / module' + Description: Checks that tests use `described_class`. SkipBlocks: false Enabled: true RSpec/DescribeMethod: - Description: 'Checks that the second argument to top level describe is the tested method name.' + Description: Checks that the second argument to `describe` specifies a method. Enabled: true RSpec/ExampleWording: - Description: 'Do not use should when describing your tests.' + Description: Checks that example descriptions do not start with "should". Enabled: true CustomTransform: be: is have: has not: does not IgnoredWords: [] +RSpec/EmptyExampleGroup: + Description: Checks if an example group does not include any tests. + Enabled: true + CustomIncludeMethods: [] +RSpec/ExpectActual: + Description: Checks for `expect(...)` calls containing literal values. + Enabled: true + +RSpec/MessageChain: + Description: Check that chains of messages are not being stubbed. + Enabled: true + RSpec/MultipleDescribes: - Description: 'Checks for multiple top level describes.' + Description: Checks for multiple top level describes. Enabled: true +RSpec/MultipleExpectations: + Description: Checks if examples contain too many `expect` calls. + Enabled: true + Max: 1 + +RSpec/NestedGroups: + Description: Checks for nested example groups. + Enabled: true + MaxNesting: 2 + RSpec/InstanceVariable: - Description: 'Checks for the usage of instance variables.' + Description: Checks for instance variable usage in specs. + AssignmentOnly: false Enabled: true +RSpec/LetSetup: + Description: Checks unreferenced `let!` calls being used for test setup. + Enabled: true + +RSpec/LeadingSubject: + Description: Checks for `subject` definitions that come after `let` definitions. + Enabled: true + RSpec/FilePath: - Description: 'Checks the file and folder naming of the spec file.' + Description: Checks that spec file paths are consistent with the test subject. Enabled: true CustomTransform: RuboCop: rubocop RSpec: rspec RSpec/VerifiedDoubles: - Description: 'Prefer using verifying doubles over normal doubles.' + Description: Prefer using verifying doubles over normal doubles. Enabled: true IgnoreSymbolicNames: false RSpec/NotToNot: - Description: 'Enforces the usage of the same method on all negative message expectations.' + Description: Checks for consistent method usage for negating expectations. EnforcedStyle: not_to SupportedStyles: - - not_to - - to_not + - not_to + - to_not Enabled: true RSpec/Focus: - Description: 'Checks if there are focused specs.' + Description: Checks if examples are focused. Enabled: true RSpec/ExampleLength: - Description: 'Checks for long example' + Description: Checks for long examples. Enabled: true Max: 5 +RSpec/MessageExpectation: + Description: Checks for consistent message expectation style. + Enabled: true + EnforcedStyle: allow + SupportedStyles: + - allow + - expect + RSpec/NamedSubject: - Description: 'Name your RSpec subject if you reference it explicitly' + Description: Checks for explicitly referenced test subjects. + Enabled: true + +RSpec/SubjectStub: + Description: Checks for stubbed test subjects. Enabled: true