Add test for name override with GitHub URLs

This commit is contained in:
Anatoli Babenia 2025-06-19 16:28:48 +03:00
parent cf2e20d586
commit dce285458e

View File

@ -43,6 +43,11 @@ RSpec.describe Homebrew::FormulaCreator do
expected_name: "pack",
expected_version: "v0.37.0",
},
"GitHub URL with name override": {
url: "https://github.com/RooVetGit/Roo-Code",
name: "roo",
expected_name: "roo",
},
}
tests.each do |description, test|
@ -56,7 +61,7 @@ RSpec.describe Homebrew::FormulaCreator do
end
end
formula_creator = described_class.new(url: test.fetch(:url), fetch:)
formula_creator = described_class.new(url: test.fetch(:url), name: test[:name], fetch:)
expect(formula_creator.name).to eq(test.fetch(:expected_name))
if (expected_version = test[:expected_version])