Skip to content

Instantly share code, notes, and snippets.

@PatrickLef
Created September 8, 2010 06:25
Show Gist options
  • Save PatrickLef/569725 to your computer and use it in GitHub Desktop.
Save PatrickLef/569725 to your computer and use it in GitHub Desktop.
def test_default_guest_gives_login_screen
get '/'
assert last_response.ok?
assert last_response.body.include?('log in to continue')
end
---------->
context "When accessing / guest should see the login screen" do
before :all do
get '/'
end
it "should have a OK status" do
last_response.should be_ok
end
it "should include 'log in to continue' in the body" do
last_response.should match /log in to continue/
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment