lib/calabash-cucumber/wait_helpers.rb in testautoi-0.9.127 vs lib/calabash-cucumber/wait_helpers.rb in testautoi-0.9.133

- old
+ new

@@ -30,10 +30,12 @@ if options_or_timeout.is_a?(Hash) timeout = options_or_timeout[:timeout] || 10 retry_frequency = options_or_timeout[:retry_frequency] || 0.2 post_timeout = options_or_timeout[:post_timeout] || 0.1 timeout_message = options_or_timeout[:timeout_message] - screenshot_on_error = options_or_timeout[:screenshot_on_error] || true + if options_or_timeout.key?(:screenshot_on_error) + screenshot_on_error = options_or_timeout[:screenshot_on_error] + end end begin Timeout::timeout(timeout,WaitError) do sleep(retry_frequency) until yield