Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
- describe "/exceptions/not_found" do
- describe "production" do
- before(:each) do
- Merb.environment = "production"
- @response = request("/exceptions/not_found")
- end
- # yep, we need to test if there isn't another
- # exceptions which can cause for example 500
- it "should return status 404" do
- @response.status.should eql(404)
- end
- it "should return HTML" do
- @response.have_content_type(:html)
- end
- it "should render correct template" do
- # TODO
- end
- end
- describe "development" do
- before(:each) do
- Merb.environment = "development"
- @response = request("/exceptions/not_found")
- end
- # yep, we need to test if there isn't another
- # exceptions which can cause for example 500
- it "should return status 404" do
- @response.status.should eql(404)
- end
- it "should return HTML" do
- @response.have_content_type(:html)
- end
- end
- end
Add Comment
Please, Sign In to add comment