class Muack::Stub
Public Instance Methods
__mock_defis_push(defi)
click to toggle source
used for Muack::Modifier#times
# File lib/muack/stub.rb, line 10 def __mock_defis_push defi # since stubs never wear out, the reverse ordering would make more sense # so that the latter wins over the previous one (overwrite) __mock_defis[defi.msg].unshift(defi) end
__mock_dispatch(actual_call)
click to toggle source
used for mocked object to dispatch mocked method
# File lib/muack/stub.rb, line 17 def __mock_dispatch actual_call defis = __mock_defis[actual_call.msg] if disp = __mock_find_checked_difi(defis, actual_call) # our spies are interested in this __mock_disps_push(actual_call) disp else Mock.__send__(:raise, # Wrong argument Unexpected.new(object, defis, actual_call)) end end
__mock_verify()
click to toggle source
used for Muack::Session#verify
# File lib/muack/stub.rb, line 7 def __mock_verify; true; end