diff options
Diffstat (limited to 'spec/unit/mixin/homebrew_user_spec.rb')
-rw-r--r-- | spec/unit/mixin/homebrew_user_spec.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/spec/unit/mixin/homebrew_user_spec.rb b/spec/unit/mixin/homebrew_user_spec.rb index de72f6b935..cc7051baa7 100644 --- a/spec/unit/mixin/homebrew_user_spec.rb +++ b/spec/unit/mixin/homebrew_user_spec.rb @@ -44,7 +44,6 @@ describe Chef::Mixin::HomebrewUser do allow(Etc).to receive_message_chain(:getpwnam, :uid).and_return(uid) expect(homebrew_user.find_homebrew_uid(user)).to eq(uid) end - end shared_examples "successfully find executable" do @@ -58,7 +57,6 @@ describe Chef::Mixin::HomebrewUser do } context "debug statement prints owner name" do - before do expect(Etc).to receive(:getpwuid).with(brew_owner).and_return(OpenStruct.new(:name => "name")) end @@ -75,12 +73,10 @@ describe Chef::Mixin::HomebrewUser do expect(File).to receive(:stat).with("/foo").and_return(stat_double) expect(homebrew_user.find_homebrew_uid(user)).to eq(brew_owner) end - end end describe "when the homebrew user is not provided" do - it "raises an error if no executable is found" do expect(File).to receive(:exist?).with(default_brew_path).and_return(false) allow(homebrew_user).to receive_message_chain(:shell_out, :stdout, :strip).and_return("") @@ -94,7 +90,5 @@ describe Chef::Mixin::HomebrewUser do let(:brew_owner) { 0 } end end - end - end |