Guest User

Untitled

a guest
Feb 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. describe "logged in", :shared => true do
  2. before(:each) do
  3. login
  4. end
  5. end
  6.  
  7. context "when logged in" do
  8. describe "Homepage: url(:home)", :when => "logged in" do
  9. it "allows the user to visit" do
  10. rack = request(:home)
  11. rack.should be_successful
  12. rack.body.should == "Welcome"
  13. end
  14. end
  15. end
  16.  
  17. context "when not logged in" do
  18. describe "Homepage: url(:home)" do
  19. it "redirects the user to the login screen" do
  20. requesting(:home).should redirect_to(:get_login)
  21. end
  22. end
  23. end
Add Comment
Please, Sign In to add comment