diff options
Diffstat (limited to 'spec/ruby/core/env/shared/store.rb')
| -rw-r--r-- | spec/ruby/core/env/shared/store.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/env/shared/store.rb b/spec/ruby/core/env/shared/store.rb index d6265c66a5..388208a8ac 100644 --- a/spec/ruby/core/env/shared/store.rb +++ b/spec/ruby/core/env/shared/store.rb @@ -14,13 +14,13 @@ describe :env_store, shared: true do it "returns the value" do value = "bar" - ENV.send(@method, "foo", value).should equal(value) + ENV.send(@method, "foo", value).should.equal?(value) end it "deletes the environment variable when the value is nil" do ENV["foo"] = "bar" ENV.send(@method, "foo", nil) - ENV.key?("foo").should be_false + ENV.key?("foo").should == false end it "coerces the key argument with #to_str" do @@ -38,23 +38,23 @@ describe :env_store, shared: true do end it "raises TypeError when the key is not coercible to String" do - -> { ENV.send(@method, Object.new, "bar") }.should raise_error(TypeError, "no implicit conversion of Object into String") + -> { ENV.send(@method, Object.new, "bar") }.should.raise(TypeError, "no implicit conversion of Object into String") end it "raises TypeError when the value is not coercible to String" do - -> { ENV.send(@method, "foo", Object.new) }.should raise_error(TypeError, "no implicit conversion of Object into String") + -> { ENV.send(@method, "foo", Object.new) }.should.raise(TypeError, "no implicit conversion of Object into String") end it "raises Errno::EINVAL when the key contains the '=' character" do - -> { ENV.send(@method, "foo=", "bar") }.should raise_error(Errno::EINVAL) + -> { ENV.send(@method, "foo=", "bar") }.should.raise(Errno::EINVAL) end it "raises Errno::EINVAL when the key is an empty string" do - -> { ENV.send(@method, "", "bar") }.should raise_error(Errno::EINVAL) + -> { ENV.send(@method, "", "bar") }.should.raise(Errno::EINVAL) end it "does nothing when the key is not a valid environment variable key and the value is nil" do ENV.send(@method, "foo=", nil) - ENV.key?("foo=").should be_false + ENV.key?("foo=").should == false end end |
