File tree 3 files changed +3
-2
lines changed
3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ def run(env)
296
296
def build_middleware
297
297
b = Rack ::Builder . new
298
298
299
+ b . use Rack ::Head
299
300
b . use Grape ::Middleware ::Error ,
300
301
:default_status => settings [ :default_error_status ] || 403 ,
301
302
:rescue_all => settings [ :rescue_all ] ,
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ def app; subject end
284
284
verb
285
285
end
286
286
send ( verb , '/example' )
287
- last_response . body . should eql verb
287
+ last_response . body . should eql verb == 'head' ? '' : verb
288
288
# Call it with a method other than the properly constrained one.
289
289
send ( verbs [ ( verbs . index ( verb ) + 1 ) % verbs . size ] , '/example' )
290
290
last_response . status . should eql 404
Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ def memoized
410
410
end
411
411
send ( verb , '/example/and/some/more' )
412
412
last_response . status . should eql ( verb == "post" ? 201 : 200 )
413
- last_response . body . should eql verb
413
+ last_response . body . should eql verb == 'head' ? '' : verb
414
414
end
415
415
end
416
416
end
You can’t perform that action at this time.
0 commit comments