blob: affa504b394999657bb20d498070b80379584465 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
require_relative '../../../spec_helper'
ruby_version_is ""..."4.0" do
require 'cgi'
describe "CGI::QueryExtension#raw_cookie" 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_COOKIE']" do
old_value, ENV['HTTP_COOKIE'] = ENV['HTTP_COOKIE'], "some_cookie=data"
begin
@cgi.raw_cookie.should == "some_cookie=data"
ensure
ENV['HTTP_COOKIE'] = old_value
end
end
end
end
|