diff --git a/Library/Homebrew/test/search_spec.rb b/Library/Homebrew/test/search_spec.rb index caaf34b652ffd1..f34763ff16e5d5 100644 --- a/Library/Homebrew/test/search_spec.rb +++ b/Library/Homebrew/test/search_spec.rb @@ -2,6 +2,7 @@ require "search" require "descriptions" +require "cmd/desc" RSpec.describe Homebrew::Search do describe "#query_regexp" do @@ -60,7 +61,7 @@ end describe "#search_descriptions" do - let(:args) { instance_double("args") } + let(:args) { Homebrew::Cmd::Desc.new(["min_arg_placeholder"]).args } context "with api" do let(:api_formulae) do @@ -72,7 +73,6 @@ end before do - allow(args).to receive_messages(formula?: false, cask?: false, eval_all?: false) allow(Homebrew::API::Formula).to receive(:all_formulae).and_return(api_formulae) allow(Homebrew::API::Cask).to receive(:all_casks).and_return(api_casks) end