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-3.5.1 spec/lib/adapters/rack/base_spec.rb
picky-3.5.0 spec/lib/adapters/rack/base_spec.rb
picky-3.4.3 spec/lib/adapters/rack/base_spec.rb
picky-3.4.2 spec/lib/adapters/rack/base_spec.rb
picky-3.4.1 spec/lib/adapters/rack/base_spec.rb
picky-3.4.0 spec/lib/adapters/rack/base_spec.rb
picky-3.3.3 spec/lib/adapters/rack/base_spec.rb
picky-3.3.2 spec/lib/adapters/rack/base_spec.rb
picky-3.3.1 spec/lib/adapters/rack/base_spec.rb
picky-3.3.0 spec/lib/adapters/rack/base_spec.rb
picky-3.2.0 spec/lib/adapters/rack/base_spec.rb
picky-3.1.13 spec/lib/adapters/rack/base_spec.rb
picky-3.1.12 spec/lib/adapters/rack/base_spec.rb
picky-3.1.11 spec/lib/adapters/rack/base_spec.rb
picky-3.1.10 spec/lib/adapters/rack/base_spec.rb
picky-3.1.9 spec/lib/adapters/rack/base_spec.rb
picky-3.1.8 spec/lib/adapters/rack/base_spec.rb
picky-3.1.7 spec/lib/adapters/rack/base_spec.rb
picky-3.1.6 spec/lib/adapters/rack/base_spec.rb
picky-3.1.5 spec/lib/adapters/rack/base_spec.rb