> @@ -110,4 +111,45 @@ def present?
> end
> end
> end
> +
> + describe "Watir.default_timeout" do
> + before do
> + Watir.default_timeout = 1
> +
> + browser.goto WatirSpec.url_for("wait.html", :needs_server => true)
> + end
> +
> + it "is used by Wait#until when no timeout is specified" do
> + expect{Wait.until() { false }}.to \
> + raise_error(Watir::Wait::TimeoutError, "timed out after 1 seconds")
> + end
> +
> + it "is used by Wait#while when no timeout is specified" do
> + expect{Wait.while() { true }}.to \
Just removing the line continuation will result in an ArgumentError. You could
go to a single line, which seems a bit too long:
````ruby
expect{Wait.while() { true }}.to raise_error(Watir::Wait::TimeoutError, "timed
out after 1 seconds")
````
or do
````ruby
expect{Wait.while() { true }}.to raise_error(Watir::Wait::TimeoutError,
"timed out after 1 seconds")
````
Did you have a preference on which of the three is the best?
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/pull/230/files#r7874473_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development