Sha256: eccea90c90cfcd2ab5fb3400e6fd760f1284f35720a64b38e1fb69a41d92bf23
Contents?: true
Size: 483 Bytes
Versions: 3
Compression:
Stored size: 483 Bytes
Contents
require 'cgi' describe "CGI::QueryExtension#referer" 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_REFERER']" do old_value, ENV['HTTP_REFERER'] = ENV['HTTP_REFERER'], "example.com" begin @cgi.referer.should == "example.com" ensure ENV['HTTP_REFERER'] = old_value end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubysl-cgi-1.0.0 | spec/queryextension/referer_spec.rb |
rubysl-cgi-2.0.1 | spec/queryextension/referer_spec.rb |
rubysl-cgi-2.0.0 | spec/queryextension/referer_spec.rb |