Sha256: ae0eb85c19b9a5c9307df3552dd4eaa4429e28c91f6be3a45fc242e15e2dd60e

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Adapters::Rack::Base do
  
  before(:each) do
    @adapter = Adapters::Rack::Base.new
  end
  
  describe 'respond_with' do
    describe 'by default' do
      it 'uses json' do
        @adapter.respond_with('response').should ==
          [200, { 'Content-Type' => 'application/json', 'Content-Length' => '8' }, ['response']]
      end
    end
    it 'adapts the content length' do
      @adapter.respond_with('123').should ==
        [200, { 'Content-Type' => 'application/json', 'Content-Length' => '3' }, ['123']]
    end
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
picky-1.4.1 spec/lib/adapters/rack/base_spec.rb
picky-1.4.0 spec/lib/adapters/rack/base_spec.rb
picky-1.3.4 spec/lib/adapters/rack/base_spec.rb
picky-1.3.3 spec/lib/adapters/rack/base_spec.rb
picky-1.3.2 spec/lib/adapters/rack/base_spec.rb
picky-1.3.1 spec/lib/adapters/rack/base_spec.rb
picky-1.3.0 spec/lib/adapters/rack/base_spec.rb