Module: RSpec::Message::Within::ExpectationPatch::InstanceMethods
- Defined in:
- lib/rspec/message/within.rb
Instance Method Summary collapse
Instance Method Details
#verify_messages_received ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rspec/message/within.rb', line 19 def @within_time ||= nil if @within_time time = Time.now + @within_time while time > Time.now break if and !negative? sleep 0 end end end |
#within(time) ⇒ Object
33 34 35 36 |
# File 'lib/rspec/message/within.rb', line 33 def within(time) @within_time = time self end |