struct Spectator::Mocks::Proxy(T)
  
  - Spectator::Mocks::Proxy(T)
- Struct
- Value
- Object
Overview
Forwards stub and call operations to a registry for a single object.
Defined in:
spectator/mocks/proxy.crConstructors
- 
        .new(object : T, scope : Scope = Scope.current)
        
          Creates a new proxy for the specified object and scope. 
Instance Method Summary
- 
        #add_call(call : Call) : Nil
        
          Records a method call made to the object this proxy represents. 
- 
        #add_stub(stub : Stub) : Nil
        
          Adds a stub to the object this proxy represents. 
- 
        #calls : Enumerable
        
          Retrieves all calls made to an object. 
- 
        #find_stub(call : Call) : Stub | Nil
        
          Finds a stub to the object this proxy represents. 
- 
        #reset : Nil
        
          Clears all previously defined stubs and recorded calls. 
Constructor Detail
Creates a new proxy for the specified object and scope.
Instance Method Detail
Records a method call made to the object this proxy represents.
See: Registry#call_call
Adds a stub to the object this proxy represents.
See: Registry#add_stub
Finds a stub to the object this proxy represents.
See: Registry#find_stub