lib/rubocop/cop/rspec/hook_argument.rb in rubocop-rspec-1.8.0 vs lib/rubocop/cop/rspec/hook_argument.rb in rubocop-rspec-1.9.0

- old
+ new

@@ -55,18 +55,16 @@ # # # good # before(:example) do # ... # end - class HookArgument < RuboCop::Cop::Cop - include RuboCop::RSpec::Language, - RuboCop::RSpec::SpecOnly, - ConfigurableEnforcedStyle + class HookArgument < Cop + include ConfigurableEnforcedStyle IMPLICIT_MSG = 'Omit the default `%p` argument for RSpec hooks.'.freeze EXPLICIT_MSG = 'Use `%p` for RSpec hooks.'.freeze - HOOKS = "{#{Hooks::ALL.to_node_pattern}}".freeze + HOOKS = Hooks::ALL.node_pattern_union.freeze def_node_matcher :scoped_hook, <<-PATTERN (block $(send nil #{HOOKS} (sym ${:each :example})) ...) PATTERN