Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/ruby/shared/process/spawn.rb
Original file line number Diff line number Diff line change
@@ -228,14 +228,14 @@
it "unsets other environment variables when given a true :unsetenv_others option" do
ENV["FOO"] = "BAR"
lambda do
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "env.rb")), unsetenv_others: true)
Process.wait @object.spawn('env', unsetenv_others: true)
end.should output_to_fd("")
end

it "unsets other environment variables when given a non-false :unsetenv_others option" do
ENV["FOO"] = "BAR"
lambda do
Process.wait @object.spawn(ruby_cmd(fixture(__FILE__, "env.rb")), unsetenv_others: :true)
Process.wait @object.spawn('env', unsetenv_others: :true)
end.should output_to_fd("")
end

@@ -255,8 +255,8 @@

it "does not unset environment variables included in the environment hash" do
lambda do
Process.wait @object.spawn({"FOO" => "BAR", "PATH" => ENV["PATH"]}, ruby_cmd(fixture(__FILE__, "env.rb"), options: '--disable-gems'), unsetenv_others: true)
end.should output_to_fd("BAR")
Process.wait @object.spawn({"FOO" => "BAR"}, 'env', unsetenv_others: true)
end.should output_to_fd("FOO=BAR\n")
end

# :pgroup

0 comments on commit bac9d47

Please sign in to comment.