spec/grape/middleware/formatter_spec.rb in grape-1.3.0 vs spec/grape/middleware/formatter_spec.rb in grape-1.3.1
- old
+ new
@@ -400,13 +400,13 @@
end
end
let(:app) { ->(_env) { [200, {}, ['']] } }
before do
Grape::Formatter.register :invalid, InvalidFormatter
- Grape::ContentTypes::CONTENT_TYPES[:invalid] = 'application/x-invalid'
+ Grape::ContentTypes.register :invalid, 'application/x-invalid'
end
after do
- Grape::ContentTypes::CONTENT_TYPES.delete(:invalid)
+ Grape::ContentTypes.default_elements.delete(:invalid)
Grape::Formatter.default_elements.delete(:invalid)
end
it 'returns response by invalid formatter' do
env = { 'PATH_INFO' => '/hello.invalid', 'HTTP_ACCEPT' => 'application/x-invalid' }