Sha256: 32e12e885cbecb54e50078821c8839b93068829d7a3304cf180779aab428e411

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

require: rubocop-rspec

inherit_from:
  - capybara.yml

# Analog of: 736b3d295f88b9ba6676fc168b823535582388c2
#
# We should avoid cops that are based on heuristics, since
# it's not clear what action to take to fix an issue.
RSpec/ExampleLength:
  Enabled: false

# We should avoid cops that are based on heuristics, since
# it's not clear what action to take to fix an issue.
RSpec/MultipleMemoizedHelpers:
  Enabled: false

# We have common cases, such as rake tasks, where we do not
# use a class to the describe the test.
RSpec/DescribeClass:
  Enabled: false

# We accept multiple expectations (within reason), preferring
# them to running mulitple similar tests.
RSpec/MultipleExpectations:
  Enabled: false

# Part of the GOV.UK feature style involves instance variables.
RSpec/InstanceVariable:
  Exclude:
    - 'spec/features/**/*.rb'
    - 'spec/system/**/*.rb'

# In GOV.UK we quite often test that a class received a method.
RSpec/MessageSpies:
  Enabled: false

# Analog of: 736b3d295f88b9ba6676fc168b823535582388c2
#
# We should avoid cops that are based on heuristics, since
# it's not clear what action to take to fix an issue.
RSpec/NestedGroups:
  Enabled: false

# Nested contexts make more sense with "and" or "but", since
# they are a refinement of an outer context.
RSpec/ContextWording:
  Prefixes:
    - when
    - with
    - without
    - and
    - but

# Within GOV.UK we use Capybara test method syntax of feature,
# scenario.
# We don't want this cop outside of feature or system specs though.
RSpec/Dialect:
  # Disables all Capybara-specific methods that have the same native 
  # RSpec method (e.g. are just aliases)
  PreferredMethods:
    background: :before
    scenario:   :it
    xscenario:  :xit
    given:      :let
    given!:     :let!
    feature:    :describe
  Exclude:
    - 'spec/features/**/*.rb'
    - 'spec/system/**/*.rb'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubocop-govuk-5.0.0 config/rspec.yml