|
|
|
|
@ -13,32 +13,32 @@ AllCops:
|
|
|
|
|
RSpec/AlignLeftLetBrace:
|
|
|
|
|
Description: Checks that left braces for adjacent single line lets are aligned.
|
|
|
|
|
Enabled: false
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
|
|
|
|
|
|
|
|
|
|
RSpec/AlignRightLetBrace:
|
|
|
|
|
Description: Checks that right braces for adjacent single line lets are aligned.
|
|
|
|
|
Enabled: false
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
|
|
|
|
|
|
|
|
|
|
RSpec/AnyInstance:
|
|
|
|
|
Description: Check that instances are not being stubbed globally.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
|
|
|
|
|
|
|
|
|
|
RSpec/AroundBlock:
|
|
|
|
|
Description: Checks that around blocks actually run the test.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
|
|
|
|
|
|
|
|
|
|
RSpec/Be:
|
|
|
|
|
Description: Check for expectations where `be` is used without argument.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
|
|
|
|
|
|
|
|
|
|
RSpec/BeEql:
|
|
|
|
|
Description: Check for expectations where `be(...)` can replace `eql(...)`.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
|
|
|
|
|
|
|
|
|
|
RSpec/BeforeAfterAll:
|
|
|
|
|
Description: Check that before/after(:all) isn't being used.
|
|
|
|
|
@ -47,12 +47,12 @@ RSpec/BeforeAfterAll:
|
|
|
|
|
- spec/spec_helper.rb
|
|
|
|
|
- spec/rails_helper.rb
|
|
|
|
|
- spec/support/**/*.rb
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
|
|
|
|
|
|
|
|
|
|
RSpec/ContextMethod:
|
|
|
|
|
Description: "`context` should not be used for specifying methods."
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
|
|
|
|
|
|
|
|
|
|
RSpec/ContextWording:
|
|
|
|
|
Description: Checks that `context` docstring starts with an allowed prefix.
|
|
|
|
|
@ -61,22 +61,22 @@ RSpec/ContextWording:
|
|
|
|
|
- when
|
|
|
|
|
- with
|
|
|
|
|
- without
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
|
|
|
|
|
|
|
|
|
|
RSpec/DescribeClass:
|
|
|
|
|
Description: Check that the first argument to the top level describe is a constant.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
|
|
|
|
|
|
|
|
|
|
RSpec/DescribeMethod:
|
|
|
|
|
Description: Checks that the second argument to `describe` specifies a method.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
|
|
|
|
|
|
|
|
|
|
RSpec/DescribeSymbol:
|
|
|
|
|
Description: Avoid describing symbols.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
|
|
|
|
|
|
|
|
|
|
RSpec/DescribedClass:
|
|
|
|
|
Description: Checks that tests use `described_class`.
|
|
|
|
|
@ -86,51 +86,56 @@ RSpec/DescribedClass:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- described_class
|
|
|
|
|
- explicit
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
|
|
|
|
|
|
|
|
|
|
RSpec/DescribedClassModuleWrapping:
|
|
|
|
|
Description: Avoid opening modules and defining specs within them.
|
|
|
|
|
Enabled: false
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping
|
|
|
|
|
|
|
|
|
|
RSpec/Dialect:
|
|
|
|
|
Description: This cop enforces custom RSpec dialects.
|
|
|
|
|
Enabled: false
|
|
|
|
|
PreferredMethods: {}
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
|
|
|
|
|
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: []
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
|
|
|
|
|
|
|
|
|
|
RSpec/EmptyLineAfterExample:
|
|
|
|
|
Description: Checks if there is an empty line after example blocks.
|
|
|
|
|
Enabled: true
|
|
|
|
|
AllowConsecutiveOneLiners: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
|
|
|
|
|
|
|
|
|
|
RSpec/EmptyLineAfterExampleGroup:
|
|
|
|
|
Description: Checks if there is an empty line after example group blocks.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
|
|
|
|
|
|
|
|
|
|
RSpec/EmptyLineAfterFinalLet:
|
|
|
|
|
Description: Checks if there is an empty line after the last let block.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
|
|
|
|
|
|
|
|
|
|
RSpec/EmptyLineAfterHook:
|
|
|
|
|
Description: Checks if there is an empty line after hook blocks.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
|
|
|
|
|
|
|
|
|
|
RSpec/EmptyLineAfterSubject:
|
|
|
|
|
Description: Checks if there is an empty line after subject block.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
|
|
|
|
|
|
|
|
|
|
RSpec/ExampleLength:
|
|
|
|
|
Description: Checks for long examples.
|
|
|
|
|
Enabled: true
|
|
|
|
|
Max: 5
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
|
|
|
|
|
|
|
|
|
|
RSpec/ExampleWithoutDescription:
|
|
|
|
|
Description: Checks for examples without a description.
|
|
|
|
|
@ -140,7 +145,7 @@ RSpec/ExampleWithoutDescription:
|
|
|
|
|
- always_allow
|
|
|
|
|
- single_line_only
|
|
|
|
|
- disallow
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
|
|
|
|
|
|
|
|
|
|
RSpec/ExampleWording:
|
|
|
|
|
Description: Checks for common mistakes in example descriptions.
|
|
|
|
|
@ -151,14 +156,14 @@ RSpec/ExampleWording:
|
|
|
|
|
have: has
|
|
|
|
|
HAVE: HAS
|
|
|
|
|
IgnoredWords: []
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
|
|
|
|
|
|
|
|
|
|
RSpec/ExpectActual:
|
|
|
|
|
Description: Checks for `expect(...)` calls containing literal values.
|
|
|
|
|
Enabled: true
|
|
|
|
|
Exclude:
|
|
|
|
|
- spec/routing/**/*
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
|
|
|
|
|
|
|
|
|
|
RSpec/ExpectChange:
|
|
|
|
|
Description: Checks for consistent style of change matcher.
|
|
|
|
|
@ -167,17 +172,17 @@ RSpec/ExpectChange:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- method_call
|
|
|
|
|
- block
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
|
|
|
|
|
|
|
|
|
|
RSpec/ExpectInHook:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Do not use `expect` in hooks such as `before`.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
|
|
|
|
|
|
|
|
|
|
RSpec/ExpectOutput:
|
|
|
|
|
Description: Checks for opportunities to use `expect { ... }.to output`.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
|
|
|
|
|
|
|
|
|
|
RSpec/FilePath:
|
|
|
|
|
Description: Checks that spec file paths are consistent with the test subject.
|
|
|
|
|
@ -186,12 +191,12 @@ RSpec/FilePath:
|
|
|
|
|
RuboCop: rubocop
|
|
|
|
|
RSpec: rspec
|
|
|
|
|
IgnoreMethods: false
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
|
|
|
|
|
|
|
|
|
|
RSpec/Focus:
|
|
|
|
|
Description: Checks if examples are focused.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
|
|
|
|
|
|
|
|
|
|
RSpec/HookArgument:
|
|
|
|
|
Description: Checks the arguments passed to `before`, `around`, and `after`.
|
|
|
|
|
@ -201,17 +206,17 @@ RSpec/HookArgument:
|
|
|
|
|
- implicit
|
|
|
|
|
- each
|
|
|
|
|
- example
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
|
|
|
|
|
|
|
|
|
|
RSpec/HooksBeforeExamples:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Checks for before/around/after hooks that come after an example.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
|
|
|
|
|
|
|
|
|
|
RSpec/ImplicitBlockExpectation:
|
|
|
|
|
Description: Check that implicit block expectation syntax is not used.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
|
|
|
|
|
|
|
|
|
|
RSpec/ImplicitExpect:
|
|
|
|
|
Description: Check that a consistent implicit expectation style is used.
|
|
|
|
|
@ -220,7 +225,7 @@ RSpec/ImplicitExpect:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- is_expected
|
|
|
|
|
- should
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
|
|
|
|
|
|
|
|
|
|
RSpec/ImplicitSubject:
|
|
|
|
|
Enabled: true
|
|
|
|
|
@ -230,23 +235,23 @@ RSpec/ImplicitSubject:
|
|
|
|
|
- single_line_only
|
|
|
|
|
- single_statement_only
|
|
|
|
|
- disallow
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
|
|
|
|
|
|
|
|
|
|
RSpec/InstanceSpy:
|
|
|
|
|
Description: Checks for `instance_double` used with `have_received`.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
|
|
|
|
|
|
|
|
|
|
RSpec/InstanceVariable:
|
|
|
|
|
Description: Checks for instance variable usage in specs.
|
|
|
|
|
AssignmentOnly: false
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
|
|
|
|
|
|
|
|
|
|
RSpec/InvalidPredicateMatcher:
|
|
|
|
|
Description: Checks invalid usage for predicate matcher.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
|
|
|
|
|
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.
|
|
|
|
|
@ -255,37 +260,37 @@ RSpec/ItBehavesLike:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- it_behaves_like
|
|
|
|
|
- it_should_behave_like
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
|
|
|
|
|
|
|
|
|
|
RSpec/IteratedExpectation:
|
|
|
|
|
Description: Check that `all` matcher is used instead of iterating over an array.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
|
|
|
|
|
|
|
|
|
|
RSpec/LeadingSubject:
|
|
|
|
|
Description: Enforce that subject is the first definition in the test.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
|
|
|
|
|
|
|
|
|
|
RSpec/LeakyConstantDeclaration:
|
|
|
|
|
Description: Checks that no class, module, or constant is declared.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
|
|
|
|
|
|
|
|
|
|
RSpec/LetBeforeExamples:
|
|
|
|
|
Description: Checks for `let` definitions that come after an example.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
|
|
|
|
|
|
|
|
|
|
RSpec/LetSetup:
|
|
|
|
|
Description: Checks unreferenced `let!` calls being used for test setup.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
|
|
|
|
|
|
|
|
|
|
RSpec/MessageChain:
|
|
|
|
|
Description: Check that chains of messages are not being stubbed.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
|
|
|
|
|
|
|
|
|
|
RSpec/MessageExpectation:
|
|
|
|
|
Description: Checks for consistent message expectation style.
|
|
|
|
|
@ -294,7 +299,7 @@ RSpec/MessageExpectation:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- allow
|
|
|
|
|
- expect
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
|
|
|
|
|
|
|
|
|
|
RSpec/MessageSpies:
|
|
|
|
|
Description: Checks that message expectations are set using spies.
|
|
|
|
|
@ -303,41 +308,41 @@ RSpec/MessageSpies:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- have_received
|
|
|
|
|
- receive
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
|
|
|
|
|
|
|
|
|
|
RSpec/MissingExampleGroupArgument:
|
|
|
|
|
Description: Checks that the first argument to an example group is not empty.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
|
|
|
|
|
|
|
|
|
|
RSpec/MultipleDescribes:
|
|
|
|
|
Description: Checks for multiple top level describes.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
|
|
|
|
|
|
|
|
|
|
RSpec/MultipleExpectations:
|
|
|
|
|
Description: Checks if examples contain too many `expect` calls.
|
|
|
|
|
Enabled: true
|
|
|
|
|
Max: 1
|
|
|
|
|
AggregateFailuresByDefault: false
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
|
|
|
|
|
|
|
|
|
|
RSpec/MultipleSubjects:
|
|
|
|
|
Description: Checks if an example group defines `subject` multiple times.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
|
|
|
|
|
|
|
|
|
|
RSpec/NamedSubject:
|
|
|
|
|
Description: Checks for explicitly referenced test subjects.
|
|
|
|
|
Enabled: true
|
|
|
|
|
IgnoreSharedExamples: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
|
|
|
|
|
|
|
|
|
|
RSpec/NestedGroups:
|
|
|
|
|
Description: Checks for nested example groups.
|
|
|
|
|
Enabled: true
|
|
|
|
|
Max: 3
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
|
|
|
|
|
|
|
|
|
|
RSpec/NotToNot:
|
|
|
|
|
Description: Checks for consistent method usage for negating expectations.
|
|
|
|
|
@ -346,47 +351,48 @@ RSpec/NotToNot:
|
|
|
|
|
- not_to
|
|
|
|
|
- to_not
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
|
|
|
|
|
|
|
|
|
|
RSpec/OverwritingSetup:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Checks if there is a let/subject that overwrites an existing one.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
|
|
|
|
|
|
|
|
|
|
RSpec/Pending:
|
|
|
|
|
Enabled: false
|
|
|
|
|
Description: Checks for any pending or skipped examples.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
|
|
|
|
|
|
|
|
|
|
RSpec/PredicateMatcher:
|
|
|
|
|
Description: Prefer using predicate matcher over using predicate method directly.
|
|
|
|
|
Enabled: true
|
|
|
|
|
Strict: true
|
|
|
|
|
EnforcedStyle: inflected
|
|
|
|
|
AllowedExplicitMatchers: []
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- inflected
|
|
|
|
|
- explicit
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
|
|
|
|
|
|
|
|
|
|
RSpec/ReceiveCounts:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Check for `once` and `twice` receive counts matchers usage.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
|
|
|
|
|
|
|
|
|
|
RSpec/ReceiveNever:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Prefer `not_to receive(...)` over `receive(...).never`.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
|
|
|
|
|
|
|
|
|
|
RSpec/RepeatedDescription:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Check for repeated description strings in example groups.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
|
|
|
|
|
|
|
|
|
|
RSpec/RepeatedExample:
|
|
|
|
|
Enabled: true
|
|
|
|
|
Description: Check for repeated examples within example groups.
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
|
|
|
|
|
|
|
|
|
|
RSpec/ReturnFromStub:
|
|
|
|
|
Enabled: true
|
|
|
|
|
@ -395,75 +401,75 @@ RSpec/ReturnFromStub:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- and_return
|
|
|
|
|
- block
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
|
|
|
|
|
|
|
|
|
|
RSpec/ScatteredLet:
|
|
|
|
|
Description: Checks for let scattered across the example group.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
|
|
|
|
|
|
|
|
|
|
RSpec/ScatteredSetup:
|
|
|
|
|
Description: Checks for setup scattered across multiple hooks in an example group.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
|
|
|
|
|
|
|
|
|
|
RSpec/SharedContext:
|
|
|
|
|
Description: Checks for proper shared_context and shared_examples usage.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
|
|
|
|
|
|
|
|
|
|
RSpec/SharedExamples:
|
|
|
|
|
Description: Enforces use of string to titleize shared examples.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
|
|
|
|
|
|
|
|
|
|
RSpec/SingleArgumentMessageChain:
|
|
|
|
|
Description: Checks that chains of messages contain more than one element.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
|
|
|
|
|
|
|
|
|
|
RSpec/SubjectStub:
|
|
|
|
|
Description: Checks for stubbed test subjects.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
|
|
|
|
|
|
|
|
|
|
RSpec/UnspecifiedException:
|
|
|
|
|
Description: Checks for a specified error in checking raised errors.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
|
|
|
|
|
|
|
|
|
|
RSpec/VerifiedDoubles:
|
|
|
|
|
Description: Prefer using verifying doubles over normal doubles.
|
|
|
|
|
Enabled: true
|
|
|
|
|
IgnoreNameless: true
|
|
|
|
|
IgnoreSymbolicNames: false
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
|
|
|
|
|
|
|
|
|
|
RSpec/VoidExpect:
|
|
|
|
|
Description: This cop checks void `expect()`.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
|
|
|
|
|
|
|
|
|
|
RSpec/Yield:
|
|
|
|
|
Description: This cop checks for calling a block within a stub.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
|
|
|
|
|
|
|
|
|
|
Capybara/CurrentPathExpectation:
|
|
|
|
|
Description: Checks that no expectations are set on Capybara's `current_path`.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
|
|
|
|
|
|
|
|
|
|
Capybara/FeatureMethods:
|
|
|
|
|
Description: Checks for consistent method usage in feature specs.
|
|
|
|
|
Enabled: true
|
|
|
|
|
EnabledMethods: []
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
|
|
|
|
|
|
|
|
|
|
FactoryBot/AttributeDefinedStatically:
|
|
|
|
|
Description: Always declare attribute values as blocks.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
|
|
|
|
|
|
|
|
|
|
FactoryBot/CreateList:
|
|
|
|
|
Description: Checks for create_list usage.
|
|
|
|
|
@ -472,7 +478,12 @@ FactoryBot/CreateList:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- create_list
|
|
|
|
|
- n_times
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
|
|
|
|
|
|
|
|
|
|
FactoryBot/FactoryClassName:
|
|
|
|
|
Description: Use string value when setting the class attribute explicitly.
|
|
|
|
|
Enabled: true
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
|
|
|
|
|
|
|
|
|
|
Rails/HttpStatus:
|
|
|
|
|
Description: Enforces use of symbolic or numeric value to describe HTTP status.
|
|
|
|
|
@ -481,4 +492,4 @@ Rails/HttpStatus:
|
|
|
|
|
SupportedStyles:
|
|
|
|
|
- numeric
|
|
|
|
|
- symbolic
|
|
|
|
|
StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
|
|
|
|
|
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
|