aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-06-12 17:58:12 -0500
committerJack Nagel2014-06-12 17:58:12 -0500
commitbc8ddf0db035bdea96f4f3138b20cf398561cbc1 (patch)
tree615e90b6c87f5d78dbb6e2d9d320f641a4de170b /Library
parentfd5aaee7e91858e3460f99106a9bb0773668c9c1 (diff)
downloadhomebrew-bc8ddf0db035bdea96f4f3138b20cf398561cbc1.tar.bz2
Move a test class that is only used once into the test
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_formula_install.rb19
1 files changed, 7 insertions, 12 deletions
diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb
index 215fba2e6..8ce9e1ae1 100644
--- a/Library/Homebrew/test/test_formula_install.rb
+++ b/Library/Homebrew/test/test_formula_install.rb
@@ -4,16 +4,6 @@ require 'test/testball'
require 'keg'
-class TestScriptFileFormula < ScriptFileFormula
- url "file://#{__FILE__}"
- version "1"
-
- def initialize(name="test_script_formula", path=nil)
- super
- end
-end
-
-
class InstallTests < Test::Unit::TestCase
def teardown
HOMEBREW_CACHE.rmtree
@@ -65,7 +55,13 @@ class InstallTests < Test::Unit::TestCase
end
def test_script_install
- f=TestScriptFileFormula.new
+ f = Class.new(ScriptFileFormula) do
+ url "file://#{__FILE__}"
+ version "1"
+ def initialize
+ super "test_script_formula", Pathname.new(__FILE__)
+ end
+ end.new
temporary_install f do
shutup do
@@ -75,5 +71,4 @@ class InstallTests < Test::Unit::TestCase
assert_equal 1, f.bin.children.length
end
end
-
end