Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorntrondsen committed Jan 16, 2015
1 parent 4f96cdb commit f18ab42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Binary file modified spec/db/test.sqlite3
Binary file not shown.
12 changes: 10 additions & 2 deletions spec/unit/handler_spec.rb
Expand Up @@ -86,15 +86,23 @@
exception.stub(:class => ActiveRecord::RecordNotFound)
handler = RailsExceptionHandler::Handler.new(env, exception)
response = handler.handle_exception
response[2].body.should == "content of 404.html"
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2
response[2].should == ["content of 404.html"]
else
response[2].body.should == "content of 404.html"
end
end

it "should use public/500.html on non-routing errors if the file exists" do
create_static_error_pages
env = create_env
handler = RailsExceptionHandler::Handler.new(env, create_exception)
response = handler.handle_exception
response[2].body.should == "content of 500.html"
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2
response[2].should == ["content of 500.html"]
else
response[2].body.should == "content of 500.html"
end
end
end

Expand Down

0 comments on commit f18ab42

Please sign in to comment.