Sha256: 884d9c2445e15d2b50f9bc826bcf87541435a4503a484176bd07ff1807a6a388

Contents?: true

Size: 646 Bytes

Versions: 24

Compression:

Stored size: 646 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Adapters::Rack::LiveParameters do
  
  let(:live_parameters) { stub :live_parameters }
  let(:adapter) { described_class.new live_parameters }
  
  describe 'to_app' do
    it 'works' do
      lambda { adapter.to_app }.should_not raise_error
    end
    it 'returns the right thing' do
      adapter.to_app.should respond_to(:call)
    end
    it 'returned lambda should call parameters on the live parameters' do
      env = { 'rack.input' => 'some input' }
      
      live_parameters.should_receive(:parameters).once.with({})
      
      adapter.to_app.call env
    end
  end
  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
picky-3.3.1 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.3.0 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.2.0 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.13 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.12 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.11 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.10 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.9 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.8 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.7 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.6 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.5 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.4 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.3 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.2 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.1 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.1.0 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.0.1 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.0.0 spec/lib/adapters/rack/live_parameters_spec.rb
picky-3.0.0.pre5 spec/lib/adapters/rack/live_parameters_spec.rb