Demonstrating problem

This commit is contained in:
Jarl Friis 2012-09-25 10:33:10 +02:00
parent 5e6a0133e3
commit 48166e14ad
2 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ Capybara::SpecHelper.spec '#has_css?' do
it "should be true if the content is on the page the given number of times" do
@session.should have_css("p", :count => 3)
@session.should have_css("p a#foo", :count => 1)
@session.should have_css("p a.doesnotexist", :count => 0)
end
it "should be false if the content occurs a different number of times than the given" do

View File

@ -38,6 +38,7 @@ Capybara::SpecHelper.spec '#has_xpath?' do
@session.should have_xpath("//p", :count => 3)
@session.should have_xpath("//p//a[@id='foo']", :count => 1)
@session.should have_xpath("//p[contains(.,'est')]", :count => 1)
@session.should have_xpath("//p//a[@id='doesnotexist']", :count => 0)
end
it "should be false if the content is on the page the given number of times" do