diff options
Diffstat (limited to 'spec/ruby/library/cgi/cookie/path_spec.rb')
-rw-r--r-- | spec/ruby/library/cgi/cookie/path_spec.rb | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/spec/ruby/library/cgi/cookie/path_spec.rb b/spec/ruby/library/cgi/cookie/path_spec.rb index 8a2f05aa50..010e87a6b8 100644 --- a/spec/ruby/library/cgi/cookie/path_spec.rb +++ b/spec/ruby/library/cgi/cookie/path_spec.rb @@ -1,23 +1,26 @@ require_relative '../../../spec_helper' -require 'cgi' -describe "CGI::Cookie#path" do - it "returns self's path" do - cookie = CGI::Cookie.new("test-cookie") - cookie.path.should == "" +ruby_version_is ""..."3.5" do + require 'cgi' - cookie = CGI::Cookie.new("name" => "test-cookie", "path" => "/some/path/") - cookie.path.should == "/some/path/" + describe "CGI::Cookie#path" do + it "returns self's path" do + cookie = CGI::Cookie.new("test-cookie") + cookie.path.should == "" + + cookie = CGI::Cookie.new("name" => "test-cookie", "path" => "/some/path/") + cookie.path.should == "/some/path/" + end end -end -describe "CGI::Cookie#path=" do - it "sets self's path" do - cookie = CGI::Cookie.new("test-cookie") - cookie.path = "/some/path/" - cookie.path.should == "/some/path/" + describe "CGI::Cookie#path=" do + it "sets self's path" do + cookie = CGI::Cookie.new("test-cookie") + cookie.path = "/some/path/" + cookie.path.should == "/some/path/" - cookie.path = "/another/path/" - cookie.path.should == "/another/path/" + cookie.path = "/another/path/" + cookie.path.should == "/another/path/" + end end end |