test/integration/cli/command/suggest_test.rb in inch-0.5.0.rc4 vs test/integration/cli/command/suggest_test.rb in inch-0.5.0.rc5

- old
+ new

@@ -1,6 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../../../test_helper") +require 'inch/utils/buffered_ui' describe ::Inch::CLI::Command::Suggest do before do Dir.chdir fixture_path(:ruby, :simple) @command = ::Inch::CLI::Command::Suggest @@ -76,9 +77,18 @@ out, err = capture_io do assert_raises(SystemExit) { @command.run("--version") } end refute out.empty?, "there should be some output" assert_match /inch\ \d\.\d\.\d/, out + assert err.empty?, "there should be no errors" + end + + it "should not output anything to stdout when used with BufferedUI" do + ui = ::Inch::Utils::BufferedUI.new + out, err = capture_io do + @command.run(:ui => ui) + end + assert out.empty?, "there should be no output" assert err.empty?, "there should be no errors" end # Edge case: Really good codebase