Created
March 1, 2011 15:18
-
-
Save roykolak/849276 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
# BAD | |
scenario "When I click on an appointment, I am taken to that appointment's details" do | |
visit my_appointments_path | |
find('li.appointment:first-child .block_link').click | |
current_path.should == my_appointment_path(fittings.last) | |
page.should have_css('li.appointment .selected') | |
end | |
#GOOD | |
scenario "Viewing a specific appointment" do | |
# When I visit the appointments page | |
visit my_appointments_path | |
# And I click an appointment | |
find('li.appointment:first-child .block_link').click | |
# Then I should be taken to the appointment's detail page | |
current_path.should == my_appointment_path(fittings.last) | |
# And the appointment date should be selected | |
page.should have_css('li.appointment .selected') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment