Class: DelayedStubResponse
- Inherits:
-
StubResponse
- Object
- StubResponse
- DelayedStubResponse
- Defined in:
- lib/brine/test_steps.rb
Instance Attribute Summary
Attributes inherited from StubResponse
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(delay) ⇒ DelayedStubResponse
constructor
A new instance of DelayedStubResponse.
Constructor Details
#initialize(delay) ⇒ DelayedStubResponse
Returns a new instance of DelayedStubResponse.
23 24 25 26 |
# File 'lib/brine/test_steps.rb', line 23 def initialize(delay) super() @activation = Time.now + delay end |
Instance Method Details
#body ⇒ Object
28 29 30 |
# File 'lib/brine/test_steps.rb', line 28 def body Time.now < @activation ? nil : @body end |