This cop tries to avoid state leaking between examples. The fixes done on the code don't follow the suggested path, since the usage of `before(:all)` was not really useful. By using RSpec's `let` method we achieve same goals but with much better and readable tests. Check Cop description at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
30 lines
592 B
YAML
30 lines
592 B
YAML
inherit_from: .rubocop_todo.yml
|
|
require: rubocop-rspec
|
|
|
|
AllCops:
|
|
DisplayCopNames: true
|
|
DisplayStyleGuide: true
|
|
Include:
|
|
- '**/Rakefile'
|
|
- '**/config.ru'
|
|
Exclude:
|
|
- 'db/**/*'
|
|
- 'config/**/*'
|
|
- 'script/**/*'
|
|
TargetRubyVersion: 2.3
|
|
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
|
# to ignore them, so only the ones explicitly set in this file are enabled.
|
|
DisabledByDefault: true
|
|
|
|
Rails:
|
|
Enabled: true
|
|
|
|
Metrics/LineLength:
|
|
Max: 140
|
|
|
|
Layout/IndentationConsistency:
|
|
EnforcedStyle: rails
|
|
|
|
RSpec/BeforeAfterAll:
|
|
Enabled: true
|