Class: RuboCop::Cop::RSpec::ContextWording
- Defined in:
- lib/rubocop/cop/rspec/context_wording.rb
Overview
Checks that ‘context` docstring starts with an allowed prefix.
Constant Summary collapse
- MSG =
'Start context description with %<prefixes>s.'
Constants inherited from Cop
RuboCop::Cop::RSpec::Cop::DEFAULT_CONFIGURATION, RuboCop::Cop::RSpec::Cop::DEFAULT_PATTERN_RE
Constants included from RSpec::Language
RSpec::Language::ALL, RSpec::Language::RSPEC
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#on_block(node) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/rubocop/cop/rspec/context_wording.rb', line 40 def on_block(node) context_wording(node) do |context| add_offense(context, message: format(MSG, prefixes: joined_prefixes)) end end |