-
-
Save sfkaos/9197884 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
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) | |
#Matchers | |
response.body.should have_content("Hello world") | |
response.body.should have_no_content("Hello world") | |
response.body.should have_selector("input") #checks for the presence of the input tag | |
response.body.should have_selector("input", :value =>"Twelve Angry Men") # checks for input tag with value | |
response.body.should have_no_selector("input") | |
response.body.should have_css("input#movie_title") | |
response.body.should have_css("input#movie_title", :value => "Twelve Angry Men") | |
response.body.should have_xpath("//a") | |
response.body.should have_xpath("//a",:href => "google.com") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment