Skip to content
Snippets Groups Projects
Commit 4e5227fd authored by Xu Cheng's avatar Xu Cheng
Browse files

test_formula: add test_facotry_with_fully_qualified_name


Closes Homebrew/homebrew#42550.

Signed-off-by: default avatarXu Cheng <xucheng@me.com>
parent 68a5b1fe
No related branches found
No related tags found
No related merge requests found
......@@ -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" }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment