-
Notifications
You must be signed in to change notification settings - Fork 15
/
.rubocop-rspec.yml
173 lines (136 loc) · 3.65 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
RSpec/AnyInstance:
Description: Check that instances are not being stubbed globally.
Enabled: false
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 a constant.
Enabled: true
Exclude:
- 'spec/views/**/*'
RSpec/DescribedClass:
Description: Checks that tests use `described_class`.
SkipBlocks: false
Enabled: false
RSpec/DescribeMethod:
Description: Checks that the second argument to `describe` specifies a method.
Enabled: true
RSpec/ExampleWording:
Description: Checks that example descriptions do not start with "should".
Enabled: false
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
Exclude:
- spec/routing/*.rb
RSpec/MessageChain:
Description: Check that chains of messages are not being stubbed.
Enabled: true
RSpec/MultipleDescribes:
Description: Checks for multiple top level describes.
Enabled: true
RSpec/MultipleExpectations:
Description: Checks if examples contain too many `expect` calls.
Enabled: false
Max: 1
RSpec/NestedGroups:
Description: Checks for nested example groups.
Enabled: true
Max: 5
RSpec/InstanceVariable:
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: false
RSpec/FilePath:
Description: Checks that spec file paths are consistent with the test subject.
Enabled: true
CustomTransform:
RuboCop: rubocop
RSpec: rspec
Exclude:
- 'spec/lib/sync/*_spec.rb'
RSpec/VerifiedDoubles:
Description: Prefer using verifying doubles over normal doubles.
Enabled: true
IgnoreSymbolicNames: false
RSpec/NotToNot:
Description: Checks for consistent method usage for negating expectations.
EnforcedStyle: not_to
SupportedStyles:
- not_to
- to_not
Enabled: false
RSpec/Focus:
Description: Checks if examples are focused.
Enabled: true
RSpec/ExampleLength:
Description: Checks for long examples.
Enabled: false
Max: 5
RSpec/MessageExpectation:
Description: Checks for consistent message expectation style.
Enabled: false
EnforcedStyle: allow
SupportedStyles:
- allow
- expect
RSpec/NamedSubject:
Description: Checks for explicitly referenced test subjects.
Enabled: false
Exclude:
- spec/controllers/**/*.rb
RSpec/SubjectStub:
Description: Checks for stubbed test subjects.
Enabled: true
RSpec/ScatteredLet:
Enabled: false
RSpec/EmptyLineAfterFinalLet:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/IteratedExpectation:
Enabled: false
RSpec/EmptyLineAfterSubject:
Enabled: false
RSpec/RepeatedDescription:
Enabled: false
RSpec/RepeatedExample:
Enabled: false
RSpec/SharedContext:
Enabled: false
RSpec/BeforeAfterAll:
Enabled: false
RSpec/ScatteredSetup:
Enabled: false
Capybara/FeatureMethods:
Enabled: false
RSpec/PredicateMatcher:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/ReturnFromStub:
Enabled: false