Guest User

Untitled

a guest
Feb 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # The crutial thing here is that the work inside "run" is only done once.
  2. # There should be no side-effects inside the examples
  3.  
  4. Spec.describe "When making a request to '/login'" do
  5. describe "as an unauthenticated user" do
  6. run do
  7. @response = request("/login")
  8. end
  9.  
  10. it "returns a 401 status" do
  11. @response.status.should == 401
  12. end
  13.  
  14. it "contains the login form" do
  15. @response.body.should have_selector("/something/i/can/not/work/out")
  16. end
  17. end
  18. end
Add Comment
Please, Sign In to add comment