File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def after
4040 throw :error , status : 500 , message : e . message
4141 end
4242 headers [ Grape ::Http ::Headers ::CONTENT_TYPE ] = content_type_for ( env [ 'api.format' ] ) unless headers [ Grape ::Http ::Headers ::CONTENT_TYPE ]
43- Rack ::Response . new ( bodymap , status , headers ) . to_a
43+ Rack ::Response . new ( bodymap , status , headers )
4444 end
4545
4646 private
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def to_json
2121 end
2222 end
2323
24- subject . call ( 'PATH_INFO' => '/somewhere' , 'HTTP_ACCEPT' => 'application/json' ) . last . each { |b | expect ( b ) . to eq ( '"bar"' ) }
24+ subject . call ( 'PATH_INFO' => '/somewhere' , 'HTTP_ACCEPT' => 'application/json' ) . to_a . last . each { |b | expect ( b ) . to eq ( '"bar"' ) }
2525 end
2626
2727 it 'calls #to_json if the content type is jsonapi' do
@@ -32,7 +32,7 @@ def to_json
3232 end
3333 end
3434
35- subject . call ( 'PATH_INFO' => '/somewhere' , 'HTTP_ACCEPT' => 'application/vnd.api+json' ) . last . each { |b | expect ( b ) . to eq ( '{"foos":[{"bar":"baz"}] }' ) }
35+ subject . call ( 'PATH_INFO' => '/somewhere' , 'HTTP_ACCEPT' => 'application/vnd.api+json' ) . to_a . last . each { |b | expect ( b ) . to eq ( '{"foos":[{"bar":"baz"}] }' ) }
3636 end
3737
3838 it 'calls #to_xml if the content type is xml' do
@@ -43,7 +43,7 @@ def to_xml
4343 end
4444 end
4545
46- subject . call ( 'PATH_INFO' => '/somewhere.xml' , 'HTTP_ACCEPT' => 'application/json' ) . last . each { |b | expect ( b ) . to eq ( '<bar/>' ) }
46+ subject . call ( 'PATH_INFO' => '/somewhere.xml' , 'HTTP_ACCEPT' => 'application/json' ) . to_a . last . each { |b | expect ( b ) . to eq ( '<bar/>' ) }
4747 end
4848 end
4949
You can’t perform that action at this time.
0 commit comments