Created
November 7, 2011 03:45
-
-
Save dbernar1/1344135 to your computer and use it in GitHub Desktop.
specs for testing content of the account menu on a website
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
it "displays create account and sign in links, and doesn't display sing out link to non-logged in users" do | |
render | |
rendered.should have_selector( '.sign-in' ) do |account_menu| | |
account_menu.should contain 'Create Account' | |
account_menu.should contain 'Sign In' | |
account_menu.should_not contain 'Sign Out' | |
end | |
end | |
it "displays sign out link, and doesn't display create account and sign in links to logged in users" do | |
render | |
rendered.should have_selector( '.sign-in' ) do |account_menu| | |
account_menu.should_not contain 'Create Account' | |
account_menu.should_not contain 'Sign In' | |
account_menu.should contain 'Sign Out' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both tests pass, which is kinda not awesome.