Sha256: 12d470f3ef9e9a53cf9db56dea36f78f8ae36fbf86ab014a8b8ec151908fc41a

Contents?: true

Size: 401 Bytes

Versions: 20

Compression:

Stored size: 401 Bytes

Contents

require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__)))

describe "indifferent_params plugin" do 
  it "allows indifferent access to request params via params method" do
    app(:indifferent_params) do |r|
      r.on do
        "#{params[:a]}/#{params[:b][0][:c]}"
      end
    end

    body('QUERY_STRING'=>'a=2&b[][c]=3', 'rack.input'=>StringIO.new).should == '2/3'
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
roda-2.2.0 spec/plugin/indifferent_params_spec.rb
roda-2.1.0 spec/plugin/indifferent_params_spec.rb
roda-2.0.0 spec/plugin/indifferent_params_spec.rb
roda-1.3.0 spec/plugin/indifferent_params_spec.rb
roda-1.2.0 spec/plugin/indifferent_params_spec.rb
roda-1.1.0 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.5 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.4 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.3 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.2 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.1 spec/plugin/indifferent_params_spec.rb
roda-cj-1.0.0 spec/plugin/indifferent_params_spec.rb
roda-1.0.0 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.6 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.5 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.4 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.3 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.2 spec/plugin/indifferent_params_spec.rb
roda-cj-0.9.1 spec/plugin/indifferent_params_spec.rb
roda-0.9.0 spec/plugin/indifferent_params_spec.rb