From b1215800d407a9a17a45e62e34d055845547e0ed Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Fri, 6 Aug 2021 11:42:55 -0400 Subject: [PATCH] Fix tests --- Library/Homebrew/dev-cmd/bottle.rb | 5 ++--- Library/Homebrew/test/api/bottle_spec.rb | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index b803e5e6fa..1af1cf4f68 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -11,6 +11,7 @@ require "utils/inreplace" require "erb" require "archive" require "zlib" +require "api" BOTTLE_ERB = <<-EOS bottle do @@ -333,8 +334,6 @@ module Homebrew root_url = args.root_url - formulae_brew_sh_path = Utils::Analytics.formula_path - relocatable = T.let(false, T::Boolean) skip_relocation = T.let(false, T::Boolean) @@ -561,7 +560,7 @@ module Homebrew "filename" => filename.url_encode, "local_filename" => filename.to_s, "sha256" => sha256, - "formulae_brew_sh_path" => formulae_brew_sh_path, + "formulae_brew_sh_path" => Homebrew::API::Formula.formula_api_path, "tab" => tab.to_bottle_hash, }, }, diff --git a/Library/Homebrew/test/api/bottle_spec.rb b/Library/Homebrew/test/api/bottle_spec.rb index 89760e45eb..e6bc6e1fa7 100644 --- a/Library/Homebrew/test/api/bottle_spec.rb +++ b/Library/Homebrew/test/api/bottle_spec.rb @@ -4,6 +4,10 @@ require "api" describe Homebrew::API::Bottle do + before do + ENV["HOMEBREW_JSON_CORE"] = "1" + end + let(:bottle_json) { <<~EOS {