Sha256: 9eb3dc4cd2b8e22ae92453ff8dce536ce63dfcce34d5158adef1bb15c2968cd4

Contents?: true

Size: 495 Bytes

Versions: 3

Compression:

Stored size: 495 Bytes

Contents

require 'cgi'

describe "CGI::QueryExtension#from" 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['HTTP_FROM']" do
    old_value, ENV['HTTP_FROM'] = ENV['HTTP_FROM'], "googlebot(at)googlebot.com"
    begin
      @cgi.from.should == "googlebot(at)googlebot.com"
    ensure
      ENV['HTTP_FROM'] = old_value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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