Sha256: 6157e83c77ec92d4bd70053e367004d07b3999c4d3f3821514edd338caf5749b

Contents?: true

Size: 591 Bytes

Versions: 52

Compression:

Stored size: 591 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Adapters::Rack::Base do
  
  before(:each) do
    @adapter = described_class.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

52 entries across 52 versions & 1 rubygems

Version Path
picky-4.0.0pre1 spec/lib/adapters/rack/base_spec.rb
picky-3.6.16 spec/lib/adapters/rack/base_spec.rb
picky-3.6.15 spec/lib/adapters/rack/base_spec.rb
picky-3.6.14 spec/lib/adapters/rack/base_spec.rb
picky-3.6.13 spec/lib/adapters/rack/base_spec.rb
picky-3.6.12 spec/lib/adapters/rack/base_spec.rb
picky-3.6.11 spec/lib/adapters/rack/base_spec.rb
picky-3.6.10 spec/lib/adapters/rack/base_spec.rb
picky-3.6.9 spec/lib/adapters/rack/base_spec.rb
picky-3.6.8 spec/lib/adapters/rack/base_spec.rb
picky-3.6.7 spec/lib/adapters/rack/base_spec.rb
picky-3.6.6 spec/lib/adapters/rack/base_spec.rb
picky-3.6.4 spec/lib/adapters/rack/base_spec.rb
picky-3.6.3 spec/lib/adapters/rack/base_spec.rb
picky-3.6.2 spec/lib/adapters/rack/base_spec.rb
picky-3.6.1 spec/lib/adapters/rack/base_spec.rb
picky-3.6.0 spec/lib/adapters/rack/base_spec.rb
picky-3.5.4 spec/lib/adapters/rack/base_spec.rb
picky-3.5.3 spec/lib/adapters/rack/base_spec.rb
picky-3.5.2 spec/lib/adapters/rack/base_spec.rb