diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-02-01 14:15:16 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2021-02-01 14:15:16 -0800 |
commit | 81f61427d9443e5322594e52034c1f829c810d2d (patch) | |
tree | 19cfacc498e1d929643ab7c2c9a8233619187770 | |
parent | 28540abf8f3c07f0463e5050458602cbb70481b6 (diff) | |
download | chef-81f61427d9443e5322594e52034c1f829c810d2d.tar.gz |
remove unnecessary stubs and clean up output
some garbage was getting output on stderr from the first block of tests
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | spec/unit/knife/supermarket_share_spec.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/unit/knife/supermarket_share_spec.rb b/spec/unit/knife/supermarket_share_spec.rb index 9e9d520540..088cef9dfd 100644 --- a/spec/unit/knife/supermarket_share_spec.rb +++ b/spec/unit/knife/supermarket_share_spec.rb @@ -46,7 +46,9 @@ describe Chef::Knife::SupermarketShare do allow(@knife).to receive(:shell_out!).and_return(true) @stdout = StringIO.new + @stderr = StringIO.new allow(@knife.ui).to receive(:stdout).and_return(@stdout) + allow(@knife.ui).to receive(:stderr).and_return(@stderr) end describe "run" do @@ -153,7 +155,6 @@ describe Chef::Knife::SupermarketShare do end it "does not upload the cookbook" do - allow(@knife).to receive(:shell_out!).and_return(@so) expect(@knife).not_to receive(:do_upload) @knife.run end @@ -166,10 +167,6 @@ describe Chef::Knife::SupermarketShare do @upload_response = double("Net::HTTPResponse") allow(Chef::CookbookSiteStreamingUploader).to receive(:post).and_return(@upload_response) - @stdout = StringIO.new - @stderr = StringIO.new - allow(@knife.ui).to receive(:stdout).and_return(@stdout) - allow(@knife.ui).to receive(:stderr).and_return(@stderr) allow(File).to receive(:open).and_return(true) end |