-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrubocop.rspec.yml
More file actions
59 lines (44 loc) · 1.03 KB
/
Copy pathrubocop.rspec.yml
File metadata and controls
59 lines (44 loc) · 1.03 KB
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
require:
- rubocop-rspec
RSpec/FilePath:
Enabled: false
# 7
RSpec/MultipleExpectations:
Max: 11
# 5
RSpec/MultipleMemoizedHelpers:
Max: 25
RSpec/LetSetup:
Enabled: false
# 10
RSpec/ExampleLength:
Max: 35
# 3
RSpec/NestedGroups:
Max: 7
RSpec/NamedSubject:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/FactoryBot:
Include:
- spec/factories/**/*.rb
RSpec/LetBeforeExamples:
Enabled: true
RSpec/MultipleDescribes:
Enabled: false
RSpec/MultipleSubjects:
Enabled: true
RSpec/ReturnFromStub:
# expect(foo).to receive(:bar) { :baz } # Bad
# expect(foo).to receive(:bar).and_return(:baz) # Good
# expect(foo).to receive(:bar).and_return { Time.current } # Good
Enabled: true
RSpec/PredicateMatcher:
# Predicate matchers' error messages are shitty, we should not use them unless they aren't
# expect(foo).to be_nil # good
# expect(foo).to be_active # bad if foo.inspect takes 5 screens
# expect(foo.active?).to be_truthy # good
Enabled: false
RSpec/NoExpectationExample:
Enabled: false