File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ def build_middleware
276276
277277 b . use Grape ::Middleware ::Formatter ,
278278 :format => settings [ :format ] ,
279- :default_format => settings [ :default_format ] || :txt ,
279+ :default_format => settings [ :default_format ] || :json ,
280280 :content_types => settings [ :content_types ]
281281
282282 aggregate_setting ( :middleware ) . each do |m |
Original file line number Diff line number Diff line change @@ -320,12 +320,12 @@ def app; subject end
320320
321321 it 'should set content type for txt format' do
322322 get '/foo'
323- last_response . headers [ 'Content-Type' ] . should eql 'text/plain '
323+ last_response . headers [ 'Content-Type' ] . should eql 'application/json '
324324 end
325325
326- it 'should set content type for json ' do
327- get '/foo.json '
328- last_response . headers [ 'Content-Type' ] . should eql 'application/json '
326+ it 'should set content type for txt ' do
327+ get '/foo.txt '
328+ last_response . headers [ 'Content-Type' ] . should eql 'text/plain '
329329 end
330330
331331 it 'should set content type for error' do
You can’t perform that action at this time.
0 commit comments