Created
April 1, 2010 15:02
-
-
Save rodreegez/351900 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'pyrite_helper' | |
class SampleTest < Pyrite::PyriteTest | |
test "homepage" do | |
visit root_path # use rails roots, or "/some/path/to/page" | |
follow "A Link" # link label text | |
press "A Button" # press a button with the value "A Button" | |
click "#anything_else" # any other elements can be clicked using a CSS selector | |
wait_for :page_load # we don't wait automatically, because that causes problems | |
assert_text "some text you should see" | |
assert_no_text "some text you should not see" | |
assert_element "#h1:contains('something I should see')" | |
assert_no_element ".no_links_in_this_div_class a" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment