Sha256: bfb67c9b55fa3e1912f3ca42211d4ff16e9330b10961dd4856b7ac40c3659dbd

Contents?: true

Size: 469 Bytes

Versions: 27

Compression:

Stored size: 469 Bytes

Contents

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

27 entries across 27 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.2.5/spec/grape/exceptions/missing_mime_type_spec.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/grape-1.2.5/spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.5 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.4 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.3 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.2.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.1.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.0.3 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.0.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.0.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-1.0.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.19.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.19.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.19.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.18.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.17.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.16.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.16.1 spec/grape/exceptions/missing_mime_type_spec.rb