diff --git a/Library/Homebrew/test/cli/named_args_spec.rb b/Library/Homebrew/test/cli/named_args_spec.rb index b3c9c16045..46505a4eb3 100644 --- a/Library/Homebrew/test/cli/named_args_spec.rb +++ b/Library/Homebrew/test/cli/named_args_spec.rb @@ -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 diff --git a/Library/Homebrew/test/support/fixtures/receipt.json b/Library/Homebrew/test/support/fixtures/receipt.json index 7fd64acc0f..6907ae040c 100644 --- a/Library/Homebrew/test/support/fixtures/receipt.json +++ b/Library/Homebrew/test/support/fixtures/receipt.json @@ -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",