diff options
Diffstat (limited to 'spec/ruby/core/env/shared')
-rw-r--r-- | spec/ruby/core/env/shared/store.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/env/shared/store.rb b/spec/ruby/core/env/shared/store.rb index 4949ca8c73..6ae91ef8fc 100644 --- a/spec/ruby/core/env/shared/store.rb +++ b/spec/ruby/core/env/shared/store.rb @@ -34,19 +34,19 @@ describe :env_store, shared: true do end it "raises TypeError when the key is not coercible to String" do - lambda { ENV.send(@method, Object.new, "bar") }.should raise_error(TypeError) + -> { ENV.send(@method, Object.new, "bar") }.should raise_error(TypeError) end it "raises TypeError when the value is not coercible to String" do - lambda { ENV.send(@method, "foo", Object.new) }.should raise_error(TypeError) + -> { ENV.send(@method, "foo", Object.new) }.should raise_error(TypeError) end it "raises Errno::EINVAL when the key contains the '=' character" do - lambda { ENV.send(@method, "foo=", "bar") }.should raise_error(Errno::EINVAL) + -> { ENV.send(@method, "foo=", "bar") }.should raise_error(Errno::EINVAL) end it "raises Errno::EINVAL when the key is an empty string" do - lambda { ENV.send(@method, "", "bar") }.should raise_error(Errno::EINVAL) + -> { ENV.send(@method, "", "bar") }.should raise_error(Errno::EINVAL) end it "does nothing when the key is not a valid environment variable key and the value is nil" do |