1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-03-28 00:22:51 +01:00
parent 296f68816c
commit f234d51eab
50 changed files with 739 additions and 377 deletions

View file

@ -207,13 +207,9 @@ describe "Process.spawn" do
it "unsets environment variables whose value is nil" do
ENV["FOO"] = "BAR"
Process.wait Process.spawn({"FOO" => nil}, "echo #{@var}>#{@name}")
expected = "\n"
platform_is :windows do
# Windows does not expand the variable if it is unset
expected = "#{@var}\n"
end
File.read(@name).should == expected
-> do
Process.wait Process.spawn({"FOO" => nil}, ruby_cmd("p ENV['FOO']"))
end.should output_to_fd("nil\n")
end
it "calls #to_hash to convert the environment" do