Created
October 3, 2008 06:12
-
-
Save wycats/14516 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
given "logged in" do | |
login | |
end | |
context "when logged in" do | |
context "Homepage: url(:home)", :given => "logged in" do | |
before(:each) do | |
@rack = request(:home) | |
end | |
it "allows the user to visit" do | |
@rack.should be_successful | |
@rack.body.should == "Welcome" | |
end | |
it "returns an HTML page" do | |
@rack.should have_content_type(:html) | |
end | |
end | |
end | |
context "when not logged in" do | |
describe "Homepage: url(:home)" do | |
it "redirects the user to the login screen" do | |
requesting(:home).should redirect_to(:get_login) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment