Created
November 14, 2012 12:40
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
Capybara.add_selector :record do | |
xpath { |record| XPath.css("#" + ActionController::RecordIdentifier.dom_id(record)) } | |
match { |record| record.is_a?(ActiveRecord::Base) } | |
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
post = Post.first | |
find(post).click_link("Hello") | |
within post do | |
fill_in("What's going on here", :with => "Holy shit this works??") | |
click_button("Yes") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome ❤️