Skip to content

Commit

Permalink
Kernel#spawn should not take an Array as it means something quite dif…
Browse files Browse the repository at this point in the history
…ferent
  • Loading branch information
eregon committed Aug 7, 2016
1 parent 88eb5ac commit be0e84c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/ruby/shared/process/spawn.rb
Expand Up @@ -230,14 +230,14 @@
it "unsets other environment variables when given a true :unsetenv_others option" do
ENV["FOO"] = "BAR"
lambda do
Process.wait @object.spawn(['ruby', fixture(__FILE__, "env.rb")], unsetenv_others: true)
Process.wait @object.spawn('ruby', fixture(__FILE__, "env.rb"), 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', fixture(__FILE__, "env.rb")], unsetenv_others: :true)
Process.wait @object.spawn('ruby', fixture(__FILE__, "env.rb"), unsetenv_others: :true)
end.should output_to_fd("")
end

Expand All @@ -257,7 +257,7 @@

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

Expand Down

0 comments on commit be0e84c

Please sign in to comment.