Sha256: 5d508153529b30d78cb08a726c9210b69bb7978ad4559274b3476d9de88332a4

Contents?: true

Size: 541 Bytes

Versions: 1

Compression:

Stored size: 541 Bytes

Contents

require 'spec_helper'

describe Response, '#content_type' do
  subject { object.content_type }

  let(:object) { Response.build.with_headers(header) }

  context 'when Content-Type header is present' do
    let(:header) { { 'Content-Type' => value } }

    let(:value) { double('Value') }

    it { should be(value) }

    it_should_behave_like 'an idempotent method'
  end

  context 'when Content-Type header is not present' do
    let(:header) { {} }

    it { should be(nil) }

    it_should_behave_like 'an idempotent method'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
response-0.0.5 spec/unit/response/content_type_spec.rb