Module: Daddy::Cucumber::Pause
- Defined in:
- lib/daddy/cucumber/pause.rb
Instance Method Summary collapse
Instance Method Details
#pause(second = nil) ⇒ Object
7 8 9 10 |
# File 'lib/daddy/cucumber/pause.rb', line 7 def pause(second = nil) duration = (second || ENV['PAUSE'] || 1).to_i sleep(duration) if duration > 0 end |
#wait_until ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/daddy/cucumber/pause.rb', line 12 def wait_until pause_count = 5 while pause_count > 0 do break if yield pause pause_count -= 1 end end |