We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c93420 commit 7874d52Copy full SHA for 7874d52
spec/grape/middleware/exception_spec.rb
@@ -90,7 +90,8 @@ def app
90
run ErrorHashApp
91
end
92
get '/'
93
- last_response.body.should == '{"error":"rain!","detail":"missing widget"}'
+ ['{"error":"rain!","detail":"missing widget"}',
94
+ '{"detail":"missing widget","error":"rain!"}'].should be_include(last_response.body)
95
96
97
it 'should be possible to specify a custom formatter' do
@@ -99,7 +100,7 @@ def app
99
100
:rescue_all => true,
101
:format => :custom,
102
:formatters => {
- :custom => lambda { |message, backtrace| { :custom_formatter => message } }
103
+ :custom => lambda { |message, backtrace| { :custom_formatter => message }.inspect }
104
}
105
run ExceptionApp
106
0 commit comments