From baba71612d5e6862c9bd4a65868ee8aa66f1214e Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Sun, 27 Sep 2015 03:06:54 +0200 Subject: [PATCH] Replace deprecated default_wait_time for Capybara closes #6430 --- features/support/env.rb | 4 ++-- features/support/matchers.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/support/env.rb b/features/support/env.rb index 0d2e93843..838d32dea 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -39,10 +39,10 @@ Capybara.default_driver = :selenium Capybara.default_selector = :css # We have a ridiculously high wait time to account for build machines of various beefiness. -# Capybara.default_wait_time = 30 +# Capybara.default_max_wait_time = 30 # While there are a lot of failures, wait less, avoiding travis timeout -Capybara.default_wait_time = 15 +Capybara.default_max_wait_time = 15 # If you set this to false, any error raised from within your app will bubble # up to your step definition and out to cucumber unless you catch it somewhere diff --git a/features/support/matchers.rb b/features/support/matchers.rb index 71a4bb600..24ddc6ff8 100644 --- a/features/support/matchers.rb +++ b/features/support/matchers.rb @@ -27,9 +27,9 @@ end def await_condition &condition - start_time = Time.now + start_time = Time.zone.now until condition.call - return false if (Time.now-start_time) > Capybara.default_wait_time + return false if (Time.zone.now - start_time) > Capybara.default_max_wait_time sleep 0.05 end true