lib/rubocop/cop/rspec/empty_example_group.rb in rubocop-rspec-1.8.0 vs lib/rubocop/cop/rspec/empty_example_group.rb in rubocop-rspec-1.9.0
- old
+ new
@@ -56,24 +56,14 @@
# include_tests 'shared tests'
# end
# end
#
class EmptyExampleGroup < Cop
- include RuboCop::RSpec::SpecOnly,
- RuboCop::RSpec::Language,
- RuboCop::RSpec::Language::NodePattern
-
MSG = 'Empty example group detected.'.freeze
def_node_search :contains_example?, <<-PATTERN
{
- (send _ {
- #{Examples::ALL.to_node_pattern}
- :it_behaves_like
- :it_should_behave_like
- :include_context
- :include_examples
- } ...)
+ #{(Examples::ALL + Includes::ALL).send_pattern}
(send _ #custom_include? ...)
}
PATTERN
def on_block(node)