Sha256: 53112778f4eccfd7482d740f153736e2ebad745c8e8402513e1833881dbf12cf

Contents?: true

Size: 515 Bytes

Versions: 7

Compression:

Stored size: 515 Bytes

Contents

# encoding: utf-8
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
      error.message.should include(
        "missing mime type for new_json"
      )
    end

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


end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
grape-0.6.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.5.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.4.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.4.0 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.3.2 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.3.1 spec/grape/exceptions/missing_mime_type_spec.rb
grape-0.3.0 spec/grape/exceptions/missing_mime_type_spec.rb