spec/unit/berkshelf/ui_spec.rb in berkshelf-3.0.0.beta3 vs spec/unit/berkshelf/ui_spec.rb in berkshelf-3.0.0.beta4

- old
+ new

@@ -27,11 +27,11 @@ context 'when quiet?' do before do subject.stub(:quiet?).and_return(true) end - it 'does not output anything' do + it 'does not output anything', :not_supported_on_windows do stdout.should_not_receive(:puts) subject.say 'message' end end @@ -64,11 +64,11 @@ before do subject.stub(:quiet?).and_return(false) end it 'prints to stdout' do - stdout.should_receive(:puts).with("\e[1m\e[32m 5\e[0m message") + stdout.should_receive(:puts).with(windows? ? " 5 message" : "\e[1m\e[32m 5\e[0m message") stdout.should_receive(:flush).with(no_args()) subject.say_status 5, 'message' end end end @@ -110,11 +110,11 @@ context 'when quiet?' do before do subject.stub(:quiet?).and_return(true) end - it 'does not output anything' do + it 'does not output anything', :not_supported_on_windows do stdout.should_not_receive(:puts) subject.error 'error!' end end @@ -122,10 +122,10 @@ before do subject.stub(:quiet?).and_return(false) end it 'prints to stderr' do - stderr.should_receive(:puts).with("\e[31merror!\e[0m") + stderr.should_receive(:puts).with(windows? ? "error!" : "\e[31merror!\e[0m") subject.error 'error!' end end end end