summaryrefslogtreecommitdiff
path: root/spec/ruby/core/env/shared/update.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/env/shared/update.rb')
-rw-r--r--spec/ruby/core/env/shared/update.rb24
1 files changed, 11 insertions, 13 deletions
diff --git a/spec/ruby/core/env/shared/update.rb b/spec/ruby/core/env/shared/update.rb
index 7d4799955b..112cc2505d 100644
--- a/spec/ruby/core/env/shared/update.rb
+++ b/spec/ruby/core/env/shared/update.rb
@@ -10,21 +10,19 @@ describe :env_update, shared: true do
end
it "adds the parameter hash to ENV, returning ENV" do
- ENV.send(@method, "foo" => "0", "bar" => "1").should equal(ENV)
+ ENV.send(@method, "foo" => "0", "bar" => "1").should.equal?(ENV)
ENV["foo"].should == "0"
ENV["bar"].should == "1"
end
- ruby_version_is "3.2" do
- it "adds the multiple parameter hashes to ENV, returning ENV" do
- ENV.send(@method, {"foo" => "multi1"}, {"bar" => "multi2"}).should equal(ENV)
- ENV["foo"].should == "multi1"
- ENV["bar"].should == "multi2"
- end
+ it "adds the multiple parameter hashes to ENV, returning ENV" do
+ ENV.send(@method, {"foo" => "multi1"}, {"bar" => "multi2"}).should.equal?(ENV)
+ ENV["foo"].should == "multi1"
+ ENV["bar"].should == "multi2"
end
it "returns ENV when no block given" do
- ENV.send(@method, {"foo" => "0", "bar" => "1"}).should equal(ENV)
+ ENV.send(@method, {"foo" => "0", "bar" => "1"}).should.equal?(ENV)
end
it "yields key, the old value and the new value when replacing an entry" do
@@ -65,23 +63,23 @@ describe :env_update, shared: true do
end
it "returns ENV when block given" do
- ENV.send(@method, {"foo" => "0", "bar" => "1"}){}.should equal(ENV)
+ ENV.send(@method, {"foo" => "0", "bar" => "1"}){}.should.equal?(ENV)
end
it "raises TypeError when a name is not coercible to String" do
- -> { ENV.send @method, Object.new => "0" }.should raise_error(TypeError, "no implicit conversion of Object into String")
+ -> { ENV.send @method, Object.new => "0" }.should.raise(TypeError, "no implicit conversion of Object into String")
end
it "raises TypeError when a 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 a name 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 a name is an empty string" do
- -> { ENV.send(@method, "" => "bar") }.should raise_error(Errno::EINVAL)
+ -> { ENV.send(@method, "" => "bar") }.should.raise(Errno::EINVAL)
end
it "updates good data preceding an error" do