Class: Muack::Spy

Inherits:
Mock
  • Object
show all
Defined in:
lib/muack/spy.rb

Instance Attribute Summary

Attributes inherited from Mock

#object

Instance Method Summary collapse

Methods inherited from Mock

#__mock_class, #__mock_defis_pop, #__mock_defis_push, #__mock_dispatch, #__mock_dispatch_call, #inspect, #method_missing

Constructor Details

#initialize(stub) ⇒ Spy

Returns a new instance of Spy.



6
7
8
9
# File 'lib/muack/spy.rb', line 6

def initialize stub
  super(stub.object)
  @stub = stub
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Muack::Mock

Instance Method Details

#__mock_resetObject

used for Muack::Session#reset, but spies never leave any track



18
# File 'lib/muack/spy.rb', line 18

def __mock_reset; end

#__mock_verifyObject

used for Muack::Session#verify



12
13
14
15
# File 'lib/muack/spy.rb', line 12

def __mock_verify
  __mock_dispatch_spy
  super
end