Resolve cmd/update-report_spec violation

This commit is contained in:
Douglas Eichelberger 2023-01-22 17:05:16 -08:00
parent a83623e4cf
commit bd62afde91

View File

@ -27,8 +27,8 @@ describe "brew update-report" do
let(:hub) { ReporterHub.new } let(:hub) { ReporterHub.new }
def perform_update(fixture_name = "") def perform_update(fixture_name = "")
allow(Formulary).to receive(:factory).and_return(double(pkg_version: "1.0")) allow(Formulary).to receive(:factory).and_return(instance_double(Formula, pkg_version: "1.0"))
allow(FormulaVersions).to receive(:new).and_return(double(formula_at_revision: "2.0")) allow(FormulaVersions).to receive(:new).and_return(instance_double(FormulaVersions, formula_at_revision: "2.0"))
diff = YAML.load_file("#{TEST_FIXTURE_DIR}/updater_fixture.yaml")[fixture_name] diff = YAML.load_file("#{TEST_FIXTURE_DIR}/updater_fixture.yaml")[fixture_name]
allow(reporter).to receive(:diff).and_return(diff || "") allow(reporter).to receive(:diff).and_return(diff || "")