Module: RSpec::MessageWithin
- Defined in:
- lib/rspec/message/within.rb
Class Method Summary collapse
Class Method Details
.until(within_time) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/rspec/message/within.rb', line 6 def self.until(within_time) if within_time && within_time > 0.0 time = Time.now + within_time while time > Time.now break if yield sleep 0 end end end |