diff options
| author | Jack Nagel | 2013-04-10 22:14:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-10 22:27:56 -0500 |
| commit | f3272fe14ba89df4bcb293ee02ffe01929a5762c (patch) | |
| tree | 505bcc8f378a17bd12c4bec680ce051103f051b7 /Library/Homebrew/test/test_formula.rb | |
| parent | 8a7cfb071d04cd7a993a23c921c9714246264276 (diff) | |
| download | homebrew-f3272fe14ba89df4bcb293ee02ffe01929a5762c.tar.bz2 | |
Eliminate test_bucket
Most of the behavior tested here is now tested elsewhere. Move the
remaining useful tests to better places.
Diffstat (limited to 'Library/Homebrew/test/test_formula.rb')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index aafc91d23..30ef41589 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -272,4 +272,29 @@ class FormulaTests < Test::Unit::TestCase assert_version_equal '1.0', f.version assert_instance_of scheme, f.version end + + def test_formula_funcs + foobar = 'foo-bar' + path = Formula.path(foobar) + + assert_match Regexp.new("^#{HOMEBREW_PREFIX}/Library/Formula"), + path.to_s + + path = HOMEBREW_PREFIX+"Library/Formula/#{foobar}.rb" + path.dirname.mkpath + File.open(path, 'w') do |f| + f << %{ + require 'formula' + class #{Formula.class_s(foobar)} < Formula + url '' + def initialize(*args) + @homepage = 'http://example.com/' + super + end + end + } + end + + assert_not_nil Formula.factory(foobar) + end end |
