-
-
Save aslakhellesoy/15198 to your computer and use it in GitHub Desktop.
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
describe "Given logged in, Homepage: url(:home)" do | |
before(:each) do | |
@rack = request(:home) | |
login | |
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 | |
describe "Given anonymous, Homepage: url(:home)" do | |
it "redirects the user to the login screen" do | |
requesting(:home).should redirect_to(:get_login) | |
end | |
end |
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
Given logged in, Homepage: url(:home) allows the user to visit | |
Given logged in, Homepage: url(:home) returns an HTML page | |
Given anonymous, Homepage: url(:home) redirects the user to the login screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment