Sha256: 9c567f8cfda496392d0411282a7e1499a8fb376ff734ddb218f31a9663fc8ad3
Contents?: true
Size: 498 Bytes
Versions: 11
Compression:
Stored size: 498 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).must_equal '2/3' body('REQUEST_METHOD'=>'POST', 'rack.input'=>StringIO.new('a=2&b[][c]=3')).must_equal '2/3' end end
Version data entries
11 entries across 11 versions & 1 rubygems