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
permalink #initialize(delay) ⇒ DelayedStubResponse
Returns a new instance of DelayedStubResponse.
24 25 26 27 |
# File 'lib/brine/test_steps.rb', line 24 def initialize(delay) super() @activation = Time.now + delay end |
Instance Method Details
permalink #body ⇒ Object
[View source]
29 30 31 |
# File 'lib/brine/test_steps.rb', line 29 def body Time.now < @activation ? nil : @body end |