From b57d467fa2f6f30b6030846ef374ce0e4e0c65b3 Mon Sep 17 00:00:00 2001 From: Greg J Preece Date: Tue, 4 Jun 2019 20:58:46 -0700 Subject: [PATCH] Revert "Updating unit tests w/ UI message suppression" This reverts commit f25427869c90a07cef8331e0909b89cb184c935c. --- test/unit/vagrant/ui_test.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/unit/vagrant/ui_test.rb b/test/unit/vagrant/ui_test.rb index 9365ff3a1..c1eb89211 100644 --- a/test/unit/vagrant/ui_test.rb +++ b/test/unit/vagrant/ui_test.rb @@ -2,7 +2,7 @@ require File.expand_path("../../base", __FILE__) describe Vagrant::UI::Basic do context "in general" do - it "outputs within a new thread" do + it "outputs within the a new thread" do current = Thread.current.object_id expect(subject).to receive(:safe_puts).with(any_args) { |*args| @@ -231,8 +231,16 @@ describe Vagrant::UI::MachineReadable do [:detail, :warn, :error, :info, :output, :success].each do |method| describe "##{method}" do - it "does not output UI type to the machine-readable output" do - expect(subject).to receive(:safe_puts).never + it "outputs UI type to the machine-readable output" do + expect(subject).to receive(:safe_puts).with(any_args) { |message| + parts = message.split(",") + expect(parts.length).to eq(5) + expect(parts[1]).to eq("") + expect(parts[2]).to eq("ui") + expect(parts[3]).to eq(method.to_s) + expect(parts[4]).to eq("foo") + true + } subject.send(method, "foo") end