aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/sandbox_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/test/sandbox_test.rb b/Library/Homebrew/test/sandbox_test.rb
index 21a3ca8c4..a633defce 100644
--- a/Library/Homebrew/test/sandbox_test.rb
+++ b/Library/Homebrew/test/sandbox_test.rb
@@ -15,11 +15,11 @@ class SandboxTest < Homebrew::TestCase
f2 = formula { url "bar-1.0" }
f2.stubs(:tap).returns(Tap.fetch("test/tap"))
- ARGV.stubs(:sandbox?).returns true
+ ENV["HOMEBREW_SANDBOX"] = "1"
assert Sandbox.formula?(f),
"Formulae should be sandboxed if --sandbox was passed."
- ARGV.stubs(:sandbox?).returns false
+ ENV.delete("HOMEBREW_SANDBOX")
assert Sandbox.formula?(f),
"Formulae should be sandboxed if in a sandboxed tap."
refute Sandbox.formula?(f2),
@@ -27,7 +27,7 @@ class SandboxTest < Homebrew::TestCase
end
def test_test?
- ARGV.stubs(:no_sandbox?).returns false
+ ENV.delete("HOMEBREW_NO_SANDBOX")
assert Sandbox.test?,
"Tests should be sandboxed unless --no-sandbox was passed."
end