Class: RuboCop::Cop::RSpec::Focus
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::RSpec::Focus
- Includes:
- RSpec::Language, RSpec::SpecOnly
- Defined in:
- lib/rubocop/cop/rspec/focus.rb
Overview
Checks if examples are focused.
Constant Summary collapse
- MSG =
'Focused spec found.'.freeze
- FOCUSABLE_SELECTORS =
focusable.to_node_pattern
- FOCUSING_SELECTORS =
focused.to_node_pattern
- FOCUS_SYMBOL =
s(:sym, :focus)
- FOCUS_TRUE =
s(:pair, FOCUS_SYMBOL, s(:true))
Constants included from RSpec::SpecOnly
RSpec::SpecOnly::DEFAULT_CONFIGURATION
Constants included from RSpec::Language
Instance Method Summary collapse
Methods included from RSpec::SpecOnly
Instance Method Details
#on_send(node) ⇒ Object
50 51 52 53 54 |
# File 'lib/rubocop/cop/rspec/focus.rb', line 50 def on_send(node) (node) do |focus| add_offense(focus, :expression) end end |