diff options
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index d61b0d820..24cf30e2b 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -228,6 +228,22 @@ class FormulaTests < Homebrew::TestCase      path.unlink    end +  def test_factory_with_fully_qualified_name +    name = "foo-bar" +    path = HOMEBREW_PREFIX+"Library/Formula/#{name}.rb" +    path.dirname.mkpath +    File.open(path, "w") do |f| +      f << %( +        class #{Formulary.class_s(name)} < Formula +          url 'foo-1.0' +        end +            ) +    end +    assert_kind_of Formula, Formulary.factory("homebrew/homebrew/#{name}") +  ensure +    path.unlink +  end +    def test_class_specs_are_always_initialized      f = formula { url "foo-1.0" } | 
