Skip to content

Instantly share code, notes, and snippets.

@vovkats
Last active August 29, 2015 13:57
Show Gist options
  • Save vovkats/9367933 to your computer and use it in GitHub Desktop.
Save vovkats/9367933 to your computer and use it in GitHub Desktop.
tests for watir-webdriver
diff --git a/wait_spec.rb b/wait_spec.rb
index efcc0b0..6ac5cab 100644
--- a/wait_spec.rb
+++ b/wait_spec.rb
@@ -34,6 +34,24 @@ not_compliant_on [:webdriver, :safari] do
}.to raise_error(Watir::Wait::TimeoutError, "timed out after 0.5 seconds, oops")
end
end
+
+ describe "#timer" do
+ it "returns default timer" do
+ expect(Wait.timer).to be_a(Wait::Timer)
+ end
+ end
+
+ describe "#timer=" do
+
+ after { Wait.timer = nil }
+
+ it "changes default timer" do
+ timer = Class.new
+ Wait.timer = timer
+ expect(Wait.timer).to eq(timer)
+ end
+ end
+
end
describe Watir::Element do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment