Sha256: ba22ba5334a4689519f2ed7b0c1f3f1a6ddc46a58b7912f03b52c2419c278790

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

require 'cgi'

describe "CGI::QueryExtension#path_info" do
  before(:each) do
    ENV['REQUEST_METHOD'], @old_request_method = "GET", ENV['REQUEST_METHOD']
    @cgi = CGI.new
  end

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

  it "returns ENV['PATH_INFO']" do
    old_value, ENV['PATH_INFO'] = ENV['PATH_INFO'], "/test/path"
    begin
      @cgi.path_info.should == "/test/path"
    ensure
      ENV['PATH_INFO'] = old_value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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