Sha256: a56d67eea2203af8df82a706ad1e18ad7f2e573f16a83f83f71e23b53b877655
Contents?: true
Size: 623 Bytes
Versions: 4
Compression:
Stored size: 623 Bytes
Contents
require 'helper' module Cri class BasicRootTestCase < Cri::TestCase def test_run_with_help cmd = Cri::Command.new_basic_root stdout, _stderr = capture_io_while do err = assert_raises SystemExit do cmd.run(%w[-h]) end assert_equal 0, err.status end assert stdout =~ /COMMANDS.*\n.*help.*show help/ end def test_run_with_help_no_exit cmd = Cri::Command.new_basic_root stdout, _stderr = capture_io_while do cmd.run(%w[-h], {}, hard_exit: false) end assert stdout =~ /COMMANDS.*\n.*help.*show help/ end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cri-2.10.1 | test/test_basic_root.rb |
cri-2.10.0 | test/test_basic_root.rb |
cri-2.9.1 | test/test_basic_root.rb |
cri-2.9.0 | test/test_basic_root.rb |