Created
March 7, 2012 23:38
-
-
Save ogredude/1997295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /^(?:|I )should see "([^"]*)"$/ do |text| | |
if page.respond_to? :should | |
page.should have_content(text) | |
else | |
assert page.has_content?(text) | |
end | |
end | |
Then /^(?:|I )should see \/([^\/]*)\/$/ do |regexp| | |
regexp = Regexp.new(regexp) | |
if page.respond_to? :should | |
page.should have_xpath('//*', :text => regexp) | |
else | |
assert page.has_xpath?('//*', :text => regexp) | |
end | |
end | |
Then /^(?:|I )should not see "([^"]*)"$/ do |text| | |
if page.respond_to? :should | |
page.should have_no_content(text) | |
else | |
assert page.has_no_content?(text) | |
end | |
end | |
Then /^(?:|I )should not see \/([^\/]*)\/$/ do |regexp| | |
regexp = Regexp.new(regexp) | |
if page.respond_to? :should | |
page.should have_no_xpath('//*', :text => regexp) | |
else | |
assert page.has_no_xpath?('//*', :text => regexp) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment