module Spy::API
Constants
- DidNotReceiveError
Public Instance Methods
assert_received(base_object, method_name)
click to toggle source
# File lib/spy/api.rb, line 5 def assert_received(base_object, method_name) assert Subroutine.get(base_object, method_name).has_been_called?, "#{method_name} was not called on #{base_object.inspect}" end
assert_received_with(base_object, method_name, *args, &block)
click to toggle source
# File lib/spy/api.rb, line 10 def assert_received_with(base_object, method_name, *args, &block) assert Subroutine.get(base_object, method_name).has_been_called_with?(*args, &block), "#{method_name} was not called on #{base_object.inspect} with #{args.inspect}" end
have_received(method_name)
click to toggle source
# File lib/spy/api.rb, line 15 def have_received(method_name) HaveReceived.new(method_name) end