The `type: :feature` is automatically detected by RSpec because these tests are inside the `spec/features` folder. Using `feature` re-adds a `type: :feature` to these files, which will result in a conflict when we upgrade to Rails 5.1's system tests. Because of this change, we also need to change `background` to `before` or else these tests will fail. We're also adding a rubocop rule so we dont' accidentally add these keywords again.
61 lines
1.0 KiB
YAML
61 lines
1.0 KiB
YAML
require: rubocop-rspec
|
|
|
|
AllCops:
|
|
DisplayCopNames: true
|
|
DisplayStyleGuide: true
|
|
Include:
|
|
- "**/Rakefile"
|
|
- "**/config.ru"
|
|
Exclude:
|
|
- "db/migrate/**/*"
|
|
- "db/schema.rb"
|
|
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
|
|
|
|
Capybara/FeatureMethods:
|
|
Enabled: true
|
|
EnabledMethods:
|
|
- scenario
|
|
- xscenario
|
|
|
|
Layout/IndentationConsistency:
|
|
EnforcedStyle: rails
|
|
|
|
Layout/IndentationWidth:
|
|
Enabled: true
|
|
|
|
Layout/EndOfLine:
|
|
EnforcedStyle: lf
|
|
|
|
Layout/TrailingBlankLines:
|
|
Enabled: true
|
|
|
|
Layout/TrailingWhitespace:
|
|
Enabled: true
|
|
|
|
Lint/LiteralAsCondition:
|
|
Enabled: true
|
|
|
|
Lint/UselessAssignment:
|
|
Enabled: true
|
|
|
|
Metrics/LineLength:
|
|
Max: 110
|
|
|
|
Rails/ActionFilter:
|
|
Enabled: true
|
|
|
|
Rails/ApplicationJob:
|
|
Enabled: true
|
|
|
|
Rails/ApplicationRecord:
|
|
Enabled: true
|
|
|
|
RSpec/NotToNot:
|
|
Enabled: true
|
|
|
|
Style/StringLiterals:
|
|
EnforcedStyle: double_quotes
|