Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe "logged in", :shared => true do
- before(:each) do
- login
- end
- end
- context "when logged in" do
- describe "Homepage: url(:home)", :when => "logged in" do
- it "allows the user to visit" do
- rack = request(:home)
- rack.should be_successful
- rack.body.should == "Welcome"
- 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
Add Comment
Please, Sign In to add comment