aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAlyssa Ross2017-01-21 15:11:49 +0000
committerAlyssa Ross2017-01-22 19:53:58 +0000
commit0c1d665568875ffccb660a65ff248b7ab98ec77c (patch)
treec4916df93a34add3eadee3edbdc390a3ad777c5c /Library
parent116ed3ec80b6d1b9d6178f25793cfcaaaa161308 (diff)
downloadbrew-0c1d665568875ffccb660a65ff248b7ab98ec77c.tar.bz2
tests: set developer in ENV rather than stubbing
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/audit_test.rb6
-rw-r--r--Library/Homebrew/test/os/mac/diagnostic_test.rb2
-rw-r--r--Library/Homebrew/test/utils_test.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/test/audit_test.rb b/Library/Homebrew/test/audit_test.rb
index 75a882d69..60cf27610 100644
--- a/Library/Homebrew/test/audit_test.rb
+++ b/Library/Homebrew/test/audit_test.rb
@@ -243,7 +243,7 @@ class FormulaAuditorTests < Homebrew::TestCase
needs_compat
require "compat/formula_specialties"
- ARGV.stubs(:homebrew_developer?).returns false
+ ENV.delete("HOMEBREW_DEVELOPER")
fa = shutup do
formula_auditor "foo", <<-EOS.undent
class Foo < GithubGistFormula
@@ -260,7 +260,7 @@ class FormulaAuditorTests < Homebrew::TestCase
needs_compat
require "compat/formula_specialties"
- ARGV.stubs(:homebrew_developer?).returns false
+ ENV.delete("HOMEBREW_DEVELOPER")
fa = formula_auditor "foo", <<-EOS.undent
class Foo < ScriptFileFormula
url "http://example.com/foo-1.0.tgz"
@@ -275,7 +275,7 @@ class FormulaAuditorTests < Homebrew::TestCase
needs_compat
require "compat/formula_specialties"
- ARGV.stubs(:homebrew_developer?).returns false
+ ENV.delete("HOMEBREW_DEVELOPER")
fa = formula_auditor "foo", <<-EOS.undent
class Foo < AmazonWebServicesFormula
url "http://example.com/foo-1.0.tgz"
diff --git a/Library/Homebrew/test/os/mac/diagnostic_test.rb b/Library/Homebrew/test/os/mac/diagnostic_test.rb
index 5f467e87b..704235b01 100644
--- a/Library/Homebrew/test/os/mac/diagnostic_test.rb
+++ b/Library/Homebrew/test/os/mac/diagnostic_test.rb
@@ -16,7 +16,7 @@ class OSMacDiagnosticChecksTest < Homebrew::TestCase
end
def test_check_for_unsupported_macos
- ARGV.stubs(:homebrew_developer?).returns false
+ ENV.delete("HOMEBREW_DEVELOPER")
OS::Mac.stubs(:prerelease?).returns true
assert_match "We do not provide support for this pre-release version.",
@checks.check_for_unsupported_macos
diff --git a/Library/Homebrew/test/utils_test.rb b/Library/Homebrew/test/utils_test.rb
index 7ff4e192a..520cd4fcd 100644
--- a/Library/Homebrew/test/utils_test.rb
+++ b/Library/Homebrew/test/utils_test.rb
@@ -207,7 +207,7 @@ class UtilTests < Homebrew::TestCase
end
def test_odeprecated
- ARGV.stubs(:homebrew_developer?).returns false
+ ENV.delete("HOMEBREW_DEVELOPER")
e = assert_raises(MethodDeprecatedError) do
odeprecated("method", "replacement",
caller: ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"],