-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop_rspec.yml
89 lines (70 loc) · 2.26 KB
/
.rubocop_rspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require: rubocop-rspec
RSpec/BeEql:
Description: Check for expectations where `be(...)` can replace `eql(...)`.
Enabled: true
RSpec/DescribeClass:
Description: Check that the first argument to the top level describe is a constant.
Enabled: true
RSpec/DescribedClass:
Description: Checks that tests use `described_class`.
SkipBlocks: false
Enabled: true
RSpec/DescribeMethod:
Description: Checks that the second argument to `describe` specifies a method.
Enabled: true
RSpec/EmptyExampleGroup:
Description: Checks if an example group does not include any tests.
Enabled: true
RSpec/ExampleLength:
Description: Checks for long examples.
Enabled: true
Exclude:
- spec/searchers/query_grammar/parser_spec.rb
Max: 10
RSpec/ExampleWording:
Description: Checks that example descriptions do not start with "should".
Enabled: true
CustomTransform:
be: is
have: has
not: does not
IgnoredWords: []
RSpec/ExpectActual:
Description: Checks for `expect(...)` calls containing literal values.
Enabled: true
RSpec/FilePath:
Description: Checks that spec file paths are consistent with the test subject.
Enabled: true
RSpec/Focus:
Description: Checks if examples are focused.
Enabled: true
RSpec/InstanceVariable:
Description: Checks for instance variable usage in specs.
Enabled: true
RSpec/LeadingSubject:
Description: Checks for `subject` definitions that come after `let` definitions.
Enabled: true
RSpec/LetSetup:
Description: Checks unreferenced `let!` calls being used for test setup.
Enabled: true
RSpec/MessageExpectation:
Description: Checks for consistent message expectation style.
Enabled: true
RSpec/MultipleDescribes:
Description: Checks for multiple top level describes.
Enabled: true
# Turn this off for acceptance tests because that breaks the api docs
RSpec/MultipleExpectations:
Description: Checks if examples contain too many `expect` calls.
Enabled: true
Exclude:
- spec/acceptance/**/*_spec.rb
RSpec/NamedSubject:
Description: Checks for explicitly referenced test subjects.
Enabled: false
RSpec/NestedGroups:
Description: Checks for nested example groups.
Enabled: false
RSpec/NotToNot:
Description: Checks for consistent method usage for negating expectations.
Enabled: true