Created
September 27, 2011 21:30
-
-
Save mxriverlynn/1246299 to your computer and use it in GitHub Desktop.
capybara has_image? matcher
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
module Capybara | |
class Session | |
def has_image?(src) | |
has_xpath?("//img[contains(@src,\"/images/#{src}\")]") | |
end | |
end | |
end |
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 /^the biometrics section should be marked incomplete$/ do | |
within "#assessment-menu" do | |
page.should have_image "warning_24.png" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cheers for this!