tests: set developer in ENV rather than stubbing
This commit is contained in:
parent
116ed3ec80
commit
0c1d665568
@ -243,7 +243,7 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
needs_compat
|
needs_compat
|
||||||
require "compat/formula_specialties"
|
require "compat/formula_specialties"
|
||||||
|
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
fa = shutup do
|
fa = shutup do
|
||||||
formula_auditor "foo", <<-EOS.undent
|
formula_auditor "foo", <<-EOS.undent
|
||||||
class Foo < GithubGistFormula
|
class Foo < GithubGistFormula
|
||||||
@ -260,7 +260,7 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
needs_compat
|
needs_compat
|
||||||
require "compat/formula_specialties"
|
require "compat/formula_specialties"
|
||||||
|
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
fa = formula_auditor "foo", <<-EOS.undent
|
fa = formula_auditor "foo", <<-EOS.undent
|
||||||
class Foo < ScriptFileFormula
|
class Foo < ScriptFileFormula
|
||||||
url "http://example.com/foo-1.0.tgz"
|
url "http://example.com/foo-1.0.tgz"
|
||||||
@ -275,7 +275,7 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
needs_compat
|
needs_compat
|
||||||
require "compat/formula_specialties"
|
require "compat/formula_specialties"
|
||||||
|
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
fa = formula_auditor "foo", <<-EOS.undent
|
fa = formula_auditor "foo", <<-EOS.undent
|
||||||
class Foo < AmazonWebServicesFormula
|
class Foo < AmazonWebServicesFormula
|
||||||
url "http://example.com/foo-1.0.tgz"
|
url "http://example.com/foo-1.0.tgz"
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class OSMacDiagnosticChecksTest < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_check_for_unsupported_macos
|
def test_check_for_unsupported_macos
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
OS::Mac.stubs(:prerelease?).returns true
|
OS::Mac.stubs(:prerelease?).returns true
|
||||||
assert_match "We do not provide support for this pre-release version.",
|
assert_match "We do not provide support for this pre-release version.",
|
||||||
@checks.check_for_unsupported_macos
|
@checks.check_for_unsupported_macos
|
||||||
|
|||||||
@ -207,7 +207,7 @@ class UtilTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_odeprecated
|
def test_odeprecated
|
||||||
ARGV.stubs(:homebrew_developer?).returns false
|
ENV.delete("HOMEBREW_DEVELOPER")
|
||||||
e = assert_raises(MethodDeprecatedError) do
|
e = assert_raises(MethodDeprecatedError) do
|
||||||
odeprecated("method", "replacement",
|
odeprecated("method", "replacement",
|
||||||
caller: ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"],
|
caller: ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user