Sha256: 132dcd7a50673e29e401cfcb22c959624fcbbe8ef358b4c286fcc60c5ec0a3df

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

describe Grape::Exceptions::MissingMimeType do
  describe '#message' do
    let(:error) do
      described_class.new('new_json')
    end

    it 'contains the problem in the message' do
      expect(error.message).to include 'missing mime type for new_json'
    end

    it 'contains the resolution in the message' do
      expect(error.message).to include "or add your own with content_type :new_json, 'application/new_json' "
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grape-1.8.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.7.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.7.0 spec/grape/exceptions/missing_mime_type_spec.rb