This commit is contained in:
Benoit Daloze 2022-08-29 18:18:23 +02:00
Родитель b5358a98e6
Коммит 1315c5aad9
4 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -3,7 +3,7 @@ describe :dir_chroot_as_root, shared: true do
DirSpecs.create_mock_dirs
@real_root = "../" * (File.dirname(__FILE__).count('/') - 1)
@ref_dir = File.join("/", Dir.new('/').entries.first)
@ref_dir = File.join("/", File.basename(Dir["/*"].first))
end
after :all do

7
spec/ruby/core/env/shared/update.rb поставляемый
Просмотреть файл

@ -17,10 +17,9 @@ describe :env_update, shared: true do
ruby_version_is "3.2" do
it "adds the multiple parameter hashes to ENV, returning ENV" do
ENV.send(@method, {"foo" => "0", "bar" => "1"}, {"baz" => "2"}).should equal(ENV)
ENV["foo"].should == "0"
ENV["bar"].should == "1"
ENV["baz"].should == "2"
ENV.send(@method, {"foo" => "multi1"}, {"bar" => "multi2"}).should equal(ENV)
ENV["foo"].should == "multi1"
ENV["bar"].should == "multi2"
end
end

Просмотреть файл

@ -18,7 +18,8 @@ describe "DateTime#to_time" do
time.sec.should == 59
end
version_is(Date::VERSION, '3.2.3') do
date_version = defined?(Date::VERSION) ? Date::VERSION : '0.0.0'
version_is(date_version, '3.2.3') do
it "returns a Time representing the same instant before Gregorian" do
datetime = DateTime.civil(1582, 10, 4, 23, 58, 59)
time = datetime.to_time.utc

Просмотреть файл

@ -13,7 +13,8 @@ describe "Time#to_datetime" do
datetime.sec.should == 59
end
version_is(Date::VERSION, '3.2.3') do
date_version = defined?(Date::VERSION) ? Date::VERSION : '0.0.0'
version_is(date_version, '3.2.3') do
it "returns a DateTime representing the same instant before Gregorian" do
time = Time.utc(1582, 10, 14, 23, 58, 59)
datetime = time.to_datetime