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-0.15.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.14.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.13.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.12.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.11.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.10.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.10.0 spec/grape/exceptions/missing_mime_type_spec.rb