Update tests
This commit is contained in:
parent
363bcbd72a
commit
1581a29b28
@ -223,14 +223,16 @@ describe Homebrew::CLI::NamedArgs do
|
||||
(HOMEBREW_CELLAR/"foo/1.0").mkpath
|
||||
(HOMEBREW_CELLAR/"foo/2.0").mkpath
|
||||
(HOMEBREW_CELLAR/"bar/1.0").mkpath
|
||||
(HOMEBREW_CELLAR/"baz/HEAD-1").mkpath
|
||||
(HOMEBREW_CELLAR/"baz/HEAD-2").mkpath
|
||||
head1 = (HOMEBREW_CELLAR/"baz/HEAD-1").mkpath
|
||||
head2 = HOMEBREW_CELLAR/"baz/HEAD-2"
|
||||
head2.mkpath
|
||||
(head2/"INSTALL_RECEIPT.json").write (TEST_FIXTURE_DIR/"receipt.json").read
|
||||
end
|
||||
|
||||
it "resolves the latest kegs with #resolve_latest_keg" do
|
||||
latest_kegs = described_class.new("foo", "bar", "baz").to_latest_kegs
|
||||
expect(latest_kegs.map(&:name)).to eq ["foo", "bar", "baz"]
|
||||
expect(latest_kegs.map { |k| k.version.version.to_s }).to eq ["2.0", "1.0", "HEAD-1"]
|
||||
expect(latest_kegs.map { |k| k.version.version.to_s }).to eq ["2.0", "1.0", "HEAD-2"]
|
||||
end
|
||||
|
||||
it "when there are no matching kegs returns an empty array" do
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
"bin/foo"
|
||||
],
|
||||
"time": 1403827774,
|
||||
"source_modified_time": 1628303333,
|
||||
"HEAD": "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
|
||||
"alias_path": "/usr/local/Library/Taps/homebrew/homebrew-core/Aliases/test-formula",
|
||||
"stdlib": "libcxx",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user