lib/rubocop/cop/rspec/repeated_example.rb in rubocop-rspec-1.42.0 vs lib/rubocop/cop/rspec/repeated_example.rb in rubocop-rspec-1.43.0
- old
+ new
@@ -13,11 +13,11 @@
#
# it 'validates the user' do
# expect(user).to be_valid
# end
#
- class RepeatedExample < Cop
+ class RepeatedExample < Base
MSG = "Don't repeat examples within an example group."
def on_block(node)
return unless example_group?(node)
@@ -39,10 +39,10 @@
end
def example_signature(example)
key_parts = [example.metadata, example.implementation]
- if example.definition.method_name == :its
+ if example.definition.method?(:its)
key_parts << example.definition.arguments
end
key_parts
end