Updated RubySpec source to 55122684.
[rbx.git] / spec / frozen / 1.8 / library / cgi / queryextension / gateway_interface_spec.rb
blob6c515593c31a3a583e685abc830e5428a1302d46
1 require File.dirname(__FILE__) + '/../../../spec_helper'
2 require 'cgi'
4 describe "CGI::QueryExtension#gateway_interface" do
5   before(:each) do
6     ENV['REQUEST_METHOD'], @old_request_method = "GET", ENV['REQUEST_METHOD']
7     @cgi = CGI.new
8   end
9   
10   after(:each) do
11     ENV['REQUEST_METHOD'] = @old_request_method
12   end
13   
14   it "returns ENV['GATEWAY_INTERFACE']" do
15     old_value, ENV['GATEWAY_INTERFACE'] = ENV['GATEWAY_INTERFACE'], "CGI/1.1"
16     begin
17       @cgi.gateway_interface.should == "CGI/1.1"
18     ensure
19       ENV['GATEWAY_INTERFACE'] = old_value
20     end
21   end
22 end