Guest User

Untitled

a guest
May 28th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
  2.  
  3. describe "/exceptions/not_found" do
  4. describe "production" do
  5. before(:each) do
  6. Merb.environment = "production"
  7. @response = request("/exceptions/not_found")
  8. end
  9.  
  10. # yep, we need to test if there isn't another
  11. # exceptions which can cause for example 500
  12. it "should return status 404" do
  13. @response.status.should eql(404)
  14. end
  15.  
  16. it "should return HTML" do
  17. @response.have_content_type(:html)
  18. end
  19.  
  20. it "should render correct template" do
  21. # TODO
  22. end
  23. end
  24.  
  25. describe "development" do
  26. before(:each) do
  27. Merb.environment = "development"
  28. @response = request("/exceptions/not_found")
  29. end
  30.  
  31. # yep, we need to test if there isn't another
  32. # exceptions which can cause for example 500
  33. it "should return status 404" do
  34. @response.status.should eql(404)
  35. end
  36.  
  37. it "should return HTML" do
  38. @response.have_content_type(:html)
  39. end
  40. end
  41. end
Add Comment
Please, Sign In to add comment