module RSpec::MessageWithin
Public Class Methods
until(within_time) { || ... }
click to toggle source
# 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