Class: RuboCop::Cop::RSpec::SpecFilePathSuffix
- Includes:
- FileHelp, TopLevelGroup
- Defined in:
- lib/rubocop/cop/rspec/spec_file_path_suffix.rb
Overview
Checks that spec file paths suffix are consistent and well-formed.
Constant Summary collapse
- MSG =
'Spec path should end with `_spec.rb`.'
Constants included from TopLevelGroup
TopLevelGroup::DEPRECATED_MODULE_METHOD_WARNING
Instance Method Summary collapse
Methods included from FileHelp
Methods included from TopLevelGroup
#on_new_investigation, #top_level_groups
Methods inherited from Base
inherited, #on_new_investigation
Methods included from RSpec::Language
#example?, #example_group?, #example_group_with_body?, #explicit_rspec?, #hook?, #include?, #let?, #rspec?, #shared_group?, #spec_group?, #subject?
Instance Method Details
#on_top_level_example_group(node) ⇒ Object
26 27 28 29 30 |
# File 'lib/rubocop/cop/rspec/spec_file_path_suffix.rb', line 26 def on_top_level_example_group(node) example_group?(node) do add_global_offense(MSG) unless correct_path? end end |