diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-04-16 21:32:20 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-16 21:32:20 -0700 |
commit | 70a76bcf98e5295ff346e0a2966b1acb36073282 (patch) | |
tree | c92eea6261fbff8595b613185afccca51eeaa774 /spec | |
parent | f0c1f7f3cf2bb3ecc607804132c342a27d14dbf0 (diff) | |
download | chef-70a76bcf98e5295ff346e0a2966b1acb36073282.tar.gz |
Update specs for brew_cmd_output
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/package/homebrew_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/package/homebrew_spec.rb b/spec/unit/provider/package/homebrew_spec.rb index 517e048f49..3bdb2cf3ae 100644 --- a/spec/unit/provider/package/homebrew_spec.rb +++ b/spec/unit/provider/package/homebrew_spec.rb @@ -278,7 +278,7 @@ describe Chef::Provider::Package::Homebrew do end end - describe "brew" do + describe "#brew_cmd_output" do before do expect(provider).to receive(:find_homebrew_uid).and_return(homebrew_uid) expect(Etc).to receive(:getpwuid).with(homebrew_uid).and_return(OpenStruct.new(name: "name", dir: "/")) @@ -286,12 +286,12 @@ describe Chef::Provider::Package::Homebrew do it "passes a single to the brew command and return stdout" do allow(provider).to receive(:shell_out!).and_return(OpenStruct.new(stdout: "zombo")) - expect(provider.brew).to eql("zombo") + expect(provider.brew_cmd_output).to eql("zombo") end it "takes multiple arguments as an array" do allow(provider).to receive(:shell_out!).and_return(OpenStruct.new(stdout: "homestarrunner")) - expect(provider.brew("info", "opts", "bananas")).to eql("homestarrunner") + expect(provider.brew_cmd_output("info", "opts", "bananas")).to eql("homestarrunner") end context "when new_resource is Package" do @@ -299,7 +299,7 @@ describe Chef::Provider::Package::Homebrew do it "does not try to read homebrew_user from Package, which does not have it" do allow(provider).to receive(:shell_out!).and_return(OpenStruct.new(stdout: "zombo")) - expect(provider.brew).to eql("zombo") + expect(provider.brew_cmd_output).to eql("zombo") end end end |