File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ def run(env)
296296 def build_middleware
297297 b = Rack ::Builder . new
298298
299+ b . use Rack ::Head
299300 b . use Grape ::Middleware ::Error ,
300301 :default_status => settings [ :default_error_status ] || 403 ,
301302 :rescue_all => settings [ :rescue_all ] ,
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ def app; subject end
284284 verb
285285 end
286286 send ( verb , '/example' )
287- last_response . body . should eql verb
287+ last_response . body . should eql verb == 'head' ? '' : verb
288288 # Call it with a method other than the properly constrained one.
289289 send ( verbs [ ( verbs . index ( verb ) + 1 ) % verbs . size ] , '/example' )
290290 last_response . status . should eql 404
Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ def memoized
410410 end
411411 send ( verb , '/example/and/some/more' )
412412 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
414414 end
415415 end
416416 end
You can’t perform that action at this time.
0 commit comments