diff options
Diffstat (limited to 'spec/ruby/library/cgi/cookie/initialize_spec.rb')
| -rw-r--r-- | spec/ruby/library/cgi/cookie/initialize_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/library/cgi/cookie/initialize_spec.rb b/spec/ruby/library/cgi/cookie/initialize_spec.rb index ac99d5e4fd..80bc2c2196 100644 --- a/spec/ruby/library/cgi/cookie/initialize_spec.rb +++ b/spec/ruby/library/cgi/cookie/initialize_spec.rb @@ -1,6 +1,6 @@ require_relative '../../../spec_helper' -ruby_version_is ""..."3.5" do +ruby_version_is ""..."4.0" do require 'cgi' describe "CGI::Cookie#initialize when passed String" do @@ -20,7 +20,7 @@ ruby_version_is ""..."3.5" do it "sets self to a non-secure cookie" do @cookie.send(:initialize, "test") - @cookie.secure.should be_false + @cookie.secure.should == false end it "does set self's path to an empty String when ENV[\"SCRIPT_NAME\"] is not set" do @@ -49,11 +49,11 @@ ruby_version_is ""..."3.5" do end it "does not set self's expiration date" do - @cookie.expires.should be_nil + @cookie.expires.should == nil end it "does not set self's domain" do - @cookie.domain.should be_nil + @cookie.domain.should == nil end end @@ -76,7 +76,7 @@ ruby_version_is ""..."3.5" do @cookie.path.should == "some/path/" @cookie.domain.should == "example.com" @cookie.expires.should == Time.at(1196524602) - @cookie.secure.should be_true + @cookie.secure.should == true end it "does set self's path based on ENV[\"SCRIPT_NAME\"] when the Hash has no 'path' entry" do @@ -122,8 +122,8 @@ ruby_version_is ""..."3.5" do end it "raises a ArgumentError when the passed Hash has no 'name' entry" do - -> { @cookie.send(:initialize, {}) }.should raise_error(ArgumentError) - -> { @cookie.send(:initialize, "value" => "test") }.should raise_error(ArgumentError) + -> { @cookie.send(:initialize, {}) }.should.raise(ArgumentError) + -> { @cookie.send(:initialize, "value" => "test") }.should.raise(ArgumentError) end end @@ -144,7 +144,7 @@ ruby_version_is ""..."3.5" do it "sets self to a non-secure cookie" do @cookie.send(:initialize, "test", "one", "two", "three") - @cookie.secure.should be_false + @cookie.secure.should == false end end end |
