Sha256: 1260c61c2156f6720b3639724da35e81216f8e9e9db9d44861d15e946619aafc

Contents?: true

Size: 519 Bytes

Versions: 3

Compression:

Stored size: 519 Bytes

Contents

require 'cgi'

describe "CGI::QueryExtension#remote_ident" 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['REMOTE_IDENT']" do
    old_value, ENV['REMOTE_IDENT'] = ENV['REMOTE_IDENT'], "no-idea-what-this-is-for"
    begin
      @cgi.remote_ident.should == "no-idea-what-this-is-for"
    ensure
      ENV['REMOTE_IDENT'] = old_value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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