diff options
| author | Alyssa Ross | 2017-01-21 15:46:28 +0000 |
|---|---|---|
| committer | Alyssa Ross | 2017-01-22 19:53:58 +0000 |
| commit | 1e1de8c111b5c3a36e4bdf886d6f2e736890ba56 (patch) | |
| tree | 0f3bcd28a576d4bc6dc29d8b4eb01b65a0527078 /Library | |
| parent | a736c7e3173fd7a9727026b5b968ac5f067a906d (diff) | |
| download | brew-1e1de8c111b5c3a36e4bdf886d6f2e736890ba56.tar.bz2 | |
tests: remove remainder of ARGV stubs
I was waiting for confirmation that there wasn't a good reason for these
to be stubbed before I removed them.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/sandbox_test.rb | 6 |
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 |
