Class: RuboCop::Cop::RSpec::Focus
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::RSpec::Focus
- Defined in:
- lib/rubocop/cop/rspec/focus.rb
Overview
Checks if test is focused.
Constant Summary collapse
- MSG =
'Focused spec found.'.freeze
- FOCUSABLE_SELECTORS =
' :context :describe :example :example_group :feature :it :scenario :specify :xcontext :xdescribe :xexample :xfeature :xit :xscenario :xspecify '.freeze
- FOCUSING_SELECTORS =
' :fcontext :fdescribe :fexample :ffeature :fit :focus :fscenario :fspecify '.freeze
- FOCUS_SYMBOL =
s(:sym, :focus)
- FOCUS_TRUE =
s(:pair, FOCUS_SYMBOL, s(:true))
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
66 67 68 69 70 |
# File 'lib/rubocop/cop/rspec/focus.rb', line 66 def on_send(node) (node) do |focus| add_offense(focus, :expression) end end |