Sha256: 03037d26e9ff9bb92119753d1ed4825c2612af82fff249f4eea640ce5ab5f702

Contents?: true

Size: 480 Bytes

Versions: 3

Compression:

Stored size: 480 Bytes

Contents

require 'cgi'

describe "CGI::QueryExtension#keys" do
  before(:each) do
    ENV['REQUEST_METHOD'], @old_request_method = "GET", ENV['REQUEST_METHOD']
    ENV['QUERY_STRING'], @old_query_string = "one=a&two=b", ENV['QUERY_STRING']

    @cgi = CGI.new
  end

  after(:each) do
    ENV['REQUEST_METHOD'] = @old_request_method
    ENV['QUERY_STRING']   = @old_query_string
  end

  it "returns all parameter keys as an Array" do
    @cgi.keys.sort.should == ["one", "two"]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-cgi-1.0.0 spec/queryextension/keys_spec.rb
rubysl-cgi-2.0.1 spec/queryextension/keys_spec.rb
rubysl-cgi-2.0.0 spec/queryextension/keys_spec.rb