diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-02-01 14:15:16 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-02-02 11:54:20 -0800 |
commit | 3aa2f80450e4b78bbbe9877c81c983f5492f01df (patch) | |
tree | d0f35a24ce96dbbddd84b4c6741fa7e051b8de1f /spec/unit | |
parent | 2771ffc1cac8eadfc1928a75722c5e727904ba70 (diff) | |
download | chef-3aa2f80450e4b78bbbe9877c81c983f5492f01df.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>
Diffstat (limited to 'spec/unit')
-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 |