spec/polonium/page_spec.rb in polonium-0.2.2 vs spec/polonium/page_spec.rb in polonium-0.3.0
- old
+ new
@@ -59,11 +59,11 @@
result("The page's html")
end
end
proc do
page.open_and_wait("/users/list")
- end.should raise_error(Test::Unit::AssertionFailedError)
+ end.should raise_error(PoloniumError)
end
end
describe Page, "#assert_title" do
it_should_behave_like "Polonium::Page"
@@ -116,11 +116,11 @@
it "fails when page does not contain expected text" do
mock(driver).is_text_present("nowhere") {false}.times(4)
lambda do
page.assert_text_present("nowhere")
- end.should raise_error(Test::Unit::AssertionFailedError)
+ end.should raise_error(PoloniumError)
end
end
describe "when passed a Regexp" do
it "passes when page contains expected text" do
@@ -133,11 +133,11 @@
it "fails when page does not contain expected text" do
mock(driver).is_text_present("regexp:nowhere") {false}.times(4)
lambda do
page.assert_text_present(/nowhere/)
- end.should raise_error(Test::Unit::AssertionFailedError)
+ end.should raise_error(PoloniumError)
end
end
it "fails when page is not loaded" do
page_not_loaded
@@ -168,11 +168,11 @@
it "fails when page contains expected text for the entire wait_for period" do
mock(driver).is_text_present("match") {true}.times(4)
lambda do
page.assert_text_not_present("match")
- end.should raise_error(Test::Unit::AssertionFailedError)
+ end.should raise_error(PoloniumError)
end
end
describe "when passed a Regexp" do
it "passes when page does not contain expected text" do
@@ -184,10 +184,10 @@
it "fails when page does contains expected text for the entire polling period" do
mock(driver).is_text_present("regexp:match") {true}.times(4)
lambda do
page.assert_text_not_present(/match/)
- end.should raise_error(Test::Unit::AssertionFailedError)
+ end.should raise_error(PoloniumError)
end
end
it "fails when page is not loaded" do
page_not_loaded