test/integration/cli/command/suggest_test.rb in inch-0.6.4 vs test/integration/cli/command/suggest_test.rb in inch-0.7.0

- old
+ new

@@ -5,10 +5,16 @@ before do Dir.chdir fixture_path(:ruby, :simple) @command = ::Inch::CLI::Command::Suggest end + it 'should run with exit status' do + _out, _err = capture_io do + assert_equal @command.run.exit_status, @command::EXIT_CODE_PENDING_SUGGESTIONS + end + end + it 'should run without args' do out, err = capture_io do @command.run end refute out.empty?, 'there should be some output' @@ -90,9 +96,16 @@ assert out.empty?, 'there should be no output' assert err.empty?, 'there should be no errors' end # Edge case: Really good codebase + + it 'should return EXIT_STATUS_SUCCESS when no suggestions' do + Dir.chdir fixture_path(:ruby, :really_good) + _out, _err = capture_io do + assert_equal @command.run.exit_status, @command::EXIT_STATUS_SUCCESS + end + end it 'should run without args on really good fixture' do out, err = capture_io do Dir.chdir fixture_path(:ruby, :really_good) @command.run