struct Spectator::Allow(T)
 
  - Spectator::Allow(T)
 - Struct
 - Value
 - Object
 
Overview
Targets a stubbable object.
This type is effectively part of the mock DSL. It is primarily used in the mock DSL to provide this syntax:
allow(dbl).to
  Defined in:
spectator/mocks/allow.crConstructors
- 
        .new(target : T)
        
          
Creates the stub target.
 
Instance Method Summary
- 
        #to(stub : Stub) : Nil
        
          
Applies a stub to the targeted stubbable object.
 
Instance methods inherited from class Object
  
  
    
      should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_not
Constructor Detail
        
        def self.new(target : T)
        #
      
      
        Creates the stub target.
The target must be a kind of Stubbable or StubbedType.