-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrubocop.rspec.yml
104 lines (74 loc) · 1.81 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
require:
- rubocop-rspec
- rubocop-factory_bot
# RSpec
RSpec/AlignLeftLetBrace:
# Never do it
Enabled: false
RSpec/AlignRightLetBrace:
# Never do it
Enabled: false
RSpec/AnyInstance:
Enabled: false
RSpec/ExampleLength:
Max: 20
Exclude:
- spec/features/**/*
RSpec/DescribeClass:
Enabled: false
RSpec/DescribedClass:
Enabled: false
RSpec/DescribeMethod:
Enabled: false
RSpec/ContextWording:
Enabled: false
RSpec/ExpectInHook:
# try not to use expect in before / after / around blocks anyway
Enabled: false
RSpec/SpecFilePathFormat:
Enabled: false
RSpec/LeadingSubject:
Enabled: false # Context includes look better at the top of context, I think
RSpec/LetBeforeExamples:
Enabled: true
RSpec/LetSetup:
Enabled: false
RSpec/MessageChain:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleDescribes:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/MultipleSubjects:
Enabled: true
RSpec/MultipleMemoizedHelpers:
Enabled: false # No idea how to limit amount of lets
RSpec/NestedGroups:
Enabled: false
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/ScatteredSetup:
Enabled: false
RSpec/VerifiedDoubles:
Enabled: false
RSpec/VoidExpect:
Enabled: true
RSpec/BeEq:
Enabled: false
RSpec/BeNil:
Enabled: false
RSpec/ExpectChange:
Enabled: false
RSpec/NoExpectationExample:
Enabled: false