lib/rubocop/cop/rspec/any_instance.rb in rubocop-rspec-1.32.0 vs lib/rubocop/cop/rspec/any_instance.rb in rubocop-rspec-1.33.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module RuboCop module Cop module RSpec # Check that instances are not being stubbed globally. # @@ -19,10 +21,10 @@ # allow(MyClass).to receive(:new).and_return(my_instance) # allow(my_instance).to receive(:foo) # end # end class AnyInstance < Cop - MSG = 'Avoid stubbing using `%<method>s`.'.freeze + MSG = 'Avoid stubbing using `%<method>s`.' def_node_matcher :disallowed_stub, <<-PATTERN (send _ ${:any_instance :allow_any_instance_of :expect_any_instance_of} ...) PATTERN