Skip to content
Browse files

Fixes for non-1.9 Rubies

  • Loading branch information...
1 parent 3c93420 commit 7874d522da6d4a72621a4da38a59b9e8eb454848 Michael Bleigh committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 spec/grape/middleware/exception_spec.rb
View
5 spec/grape/middleware/exception_spec.rb
@@ -90,7 +90,8 @@ def app
run ErrorHashApp
end
get '/'
- last_response.body.should == '{"error":"rain!","detail":"missing widget"}'
+ ['{"error":"rain!","detail":"missing widget"}',
+ '{"detail":"missing widget","error":"rain!"}'].should be_include(last_response.body)
end
it 'should be possible to specify a custom formatter' do
@@ -99,7 +100,7 @@ def app
:rescue_all => true,
:format => :custom,
:formatters => {
- :custom => lambda { |message, backtrace| { :custom_formatter => message } }
+ :custom => lambda { |message, backtrace| { :custom_formatter => message }.inspect }
}
run ExceptionApp
end

0 comments on commit 7874d52

Please sign in to comment.
Something went wrong with that request. Please try again.