Skip to content

Commit 7874d52

Browse files
author
Michael Bleigh
committed
Fixes for non-1.9 Rubies
1 parent 3c93420 commit 7874d52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/grape/middleware/exception_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def app
9090
run ErrorHashApp
9191
end
9292
get '/'
93-
last_response.body.should == '{"error":"rain!","detail":"missing widget"}'
93+
['{"error":"rain!","detail":"missing widget"}',
94+
'{"detail":"missing widget","error":"rain!"}'].should be_include(last_response.body)
9495
end
9596

9697
it 'should be possible to specify a custom formatter' do
@@ -99,7 +100,7 @@ def app
99100
:rescue_all => true,
100101
:format => :custom,
101102
:formatters => {
102-
:custom => lambda { |message, backtrace| { :custom_formatter => message } }
103+
:custom => lambda { |message, backtrace| { :custom_formatter => message }.inspect }
103104
}
104105
run ExceptionApp
105106
end

0 commit comments

Comments
 (0)