tests: remove explicit tmpdir deletions
These are no longer necessary.
This commit is contained in:
parent
d7b8420aaa
commit
1aee7c6945
@ -10,11 +10,6 @@ class FormulaTextTests < Homebrew::TestCase
|
|||||||
@dir = mktmpdir
|
@dir = mktmpdir
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
FileUtils.rm_rf @dir
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
def formula_text(name, body = nil, options = {})
|
def formula_text(name, body = nil, options = {})
|
||||||
path = Pathname.new "#{@dir}/#{name}.rb"
|
path = Pathname.new "#{@dir}/#{name}.rb"
|
||||||
path.open("w") do |f|
|
path.open("w") do |f|
|
||||||
@ -64,11 +59,6 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
@dir = mktmpdir
|
@dir = mktmpdir
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
FileUtils.rm_rf @dir
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
def formula_auditor(name, text, options = {})
|
def formula_auditor(name, text, options = {})
|
||||||
path = Pathname.new "#{@dir}/#{name}.rb"
|
path = Pathname.new "#{@dir}/#{name}.rb"
|
||||||
path.open("w") do |f|
|
path.open("w") do |f|
|
||||||
|
@ -15,11 +15,6 @@ class LanguagePythonTests < Homebrew::TestCase
|
|||||||
@venv = Language::Python::Virtualenv::Virtualenv.new(@formula, @dir, "python")
|
@venv = Language::Python::Virtualenv::Virtualenv.new(@formula, @dir, "python")
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
FileUtils.rm_rf @dir
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_virtualenv_creation
|
def test_virtualenv_creation
|
||||||
@formula.expects(:resource).with("homebrew-virtualenv").returns(
|
@formula.expects(:resource).with("homebrew-virtualenv").returns(
|
||||||
mock("resource", stage: true)
|
mock("resource", stage: true)
|
||||||
|
@ -13,12 +13,6 @@ module PathnameTestExtension
|
|||||||
@file = @src/"foo"
|
@file = @src/"foo"
|
||||||
@dir = @src/"bar"
|
@dir = @src/"bar"
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
rmtree(@src)
|
|
||||||
rmtree(@dst)
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class PathnameTests < Homebrew::TestCase
|
class PathnameTests < Homebrew::TestCase
|
||||||
|
@ -10,11 +10,6 @@ class SandboxTest < Homebrew::TestCase
|
|||||||
@file = @dir/"foo"
|
@file = @dir/"foo"
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
|
||||||
@dir.rmtree
|
|
||||||
super
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_formula?
|
def test_formula?
|
||||||
f = formula { url "foo-1.0" }
|
f = formula { url "foo-1.0" }
|
||||||
f2 = formula { url "bar-1.0" }
|
f2 = formula { url "bar-1.0" }
|
||||||
|
@ -11,7 +11,6 @@ class UtilTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
@dir.rmtree
|
|
||||||
ENV.replace @env
|
ENV.replace @env
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user