diff options
| author | Xu Cheng | 2015-09-06 20:47:40 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-09-06 20:47:40 +0800 |
| commit | ccc7a5f1bd021a28694bd2f742020316631f28ca (patch) | |
| tree | af913511f60a751ed556cbe1a800a6232f2b136f /Library/Homebrew/test/test_formula.rb | |
| parent | ee1dd24b1978c47c6cc7e374fdcf770f52f0ae40 (diff) | |
| download | brew-ccc7a5f1bd021a28694bd2f742020316631f28ca.tar.bz2 | |
add test_formulary
Closes Homebrew/homebrew#43506.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/test/test_formula.rb')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 24cf30e2b..4d198ba28 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -153,14 +153,6 @@ class FormulaTests < Homebrew::TestCase assert_nil Testball.new <=> Object.new end - def test_class_naming - assert_equal "ShellFm", Formulary.class_s("shell.fm") - assert_equal "Fooxx", Formulary.class_s("foo++") - assert_equal "SLang", Formulary.class_s("s-lang") - assert_equal "PkgConfig", Formulary.class_s("pkg-config") - assert_equal "FooBar", Formulary.class_s("foo_bar") - end - def test_formula_spec_integration f = formula do homepage "http://example.com" @@ -212,38 +204,6 @@ class FormulaTests < Homebrew::TestCase assert_equal Pathname.new("#{HOMEBREW_LIBRARY}/Formula/#{name}.rb"), Formulary.core_path(name) end - def test_factory - 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(name) - ensure - 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" } |
