spec: add a wait_until
helper
This commit is contained in:
parent
e870ba186f
commit
c2fcc6057e
1 changed files with 7 additions and 0 deletions
|
@ -67,6 +67,13 @@ module FeatureHelpers
|
|||
$stderr.write 'Spec paused. Press enter to continue:'
|
||||
$stdin.gets
|
||||
end
|
||||
|
||||
def wait_until
|
||||
Timeout.timeout(Capybara.default_max_wait_time) do
|
||||
sleep(0.1) until (value = yield)
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
|
|
Loading…
Reference in a new issue