Updated RubySpec source to 55122684.
[rbx.git] / spec / frozen / 1.8 / library / cgi / queryextension / raw_cookie_spec.rb
blob7eda54e37e6cb5936f105f4effe3ff525e99806d
1 require File.dirname(__FILE__) + '/../../../spec_helper'
2 require 'cgi'
4 describe "CGI::QueryExtension#raw_cookie" 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['HTTP_COOKIE']" do
15     old_value, ENV['HTTP_COOKIE'] = ENV['HTTP_COOKIE'], "some_cookie=data"
16     begin
17       @cgi.raw_cookie.should == "some_cookie=data"
18     ensure
19       ENV['HTTP_COOKIE'] = old_value
20     end
21   end
22 end