Updated RubySpec source to 55122684.
[rbx.git] / spec / frozen / 1.8 / library / cgi / cookie / path_spec.rb
bloba6824312767de5b54c130f5e7d59e758a6c0bc0e
1 require File.dirname(__FILE__) + '/../../../spec_helper'
2 require 'cgi'
4 describe "CGI::Cookie#path" do
5   it "returns self's path" do
6     cookie = CGI::Cookie.new("test-cookie")
7     cookie.path.should == ""
8     
9     cookie = CGI::Cookie.new("name" => "test-cookie", "path" => "/some/path/")
10     cookie.path.should == "/some/path/"
11   end
12 end
14 describe "CGI::Cookie#path=" do
15   it "sets self's path" do
16     cookie = CGI::Cookie.new("test-cookie")
17     cookie.path = "/some/path/"
18     cookie.path.should == "/some/path/"
19     
20     cookie.path = "/another/path/"
21     cookie.path.should == "/another/path/"
22   end
23 end