Sha256: 0541987173275d40948fff953c18b0860d84776cb7786b0dd39f22b17fcbcf53

Contents?: true

Size: 500 Bytes

Versions: 13

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

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

13 entries across 13 versions & 2 rubygems

Version Path
grape-1.6.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.6.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.6.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.5.3 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.5.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.5.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.5.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.4.0/spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.4.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.3.3 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.3.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.3.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.3.0 spec/grape/exceptions/missing_mime_type_spec.rb