spec/public/matchers/have_xpath_spec.rb in diabolo-webrat-0.4.4.2 vs spec/public/matchers/have_xpath_spec.rb in diabolo-webrat-0.5.1
- old
+ new
@@ -92,11 +92,11 @@
it "should match descendants of the matched elements in the block" do
@body.should have_xpath("//ul") do |node|
node.should have_xpath("//a[@href='http://example.org']")
end
end
-
+
it "should allow descendant selectors in the block" do
@body.should have_xpath("//div[@id='main']") do |node|
node.should have_xpath("//ul//a")
end
end
@@ -115,11 +115,11 @@
end
it "should throw an exception when the body doesnt have matching xpath" do
lambda {
assert_have_xpath("//p")
- }.should raise_error(Test::Unit::AssertionFailedError)
+ }.should raise_error(AssertionFailedError)
end
end
describe "assert_have_no_xpath" do
it "should pass when the body doesn't contan the xpath" do
@@ -127,10 +127,10 @@
end
it "should throw an exception when the body does contain the xpath" do
lambda {
assert_have_no_xpath("//div")
- }.should raise_error(Test::Unit::AssertionFailedError)
+ }.should raise_error(AssertionFailedError)
end
end
end
end