lib/rubocop/cop/rspec/any_instance.rb in rubocop-rspec-1.5.1 vs lib/rubocop/cop/rspec/any_instance.rb in rubocop-rspec-1.5.2

- old
+ new

@@ -1,7 +1,5 @@ -# encoding: utf-8 - module RuboCop module Cop module RSpec # Pefer instance doubles over stubbing any instance of a class # @@ -31,17 +29,10 @@ def on_send(node) _receiver, method_name, *_args = *node return unless ANY_INSTANCE_METHODS.include?(method_name) - add_offense( - node, - :expression, - format( - MESSAGE % { method: method_name }, - node.loc.expression.source - ) - ) + add_offense(node, :expression, MESSAGE % { method: method_name }) end end end end end