Module: SnapCI::ParallelTests::Test::CLIHelper
- Extended by:
- CLIHelper
- Included in:
- CLIHelper
- Defined in:
- lib/snap_ci/parallel_tests/test/cli_helper.rb
Instance Method Summary collapse
- #render_footer(optparser, options) ⇒ Object
- #render_header(optparser, options) ⇒ Object
- #render_options(optparser, options) ⇒ Object
Instance Method Details
#render_footer(optparser, options) ⇒ Object
19 20 21 |
# File 'lib/snap_ci/parallel_tests/test/cli_helper.rb', line 19 def (optparser, ) optparser.separator "\nRun `ruby -r test/test_helper -e1 --help' for supported Test::Unit or MiniTest options." end |
#render_header(optparser, options) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/snap_ci/parallel_tests/test/cli_helper.rb', line 5 def render_header(optparser, ) optparser. = <<BANNER Usage: #{optparser.program_name} [options] [files or directories] [-- [Test::Unit or MiniTest options]] Example: #{optparser.program_name} test/models test/controllers/foo_controller_test.rb -- --verbose --seed 10 BANNER end |
#render_options(optparser, options) ⇒ Object
13 14 15 16 17 |
# File 'lib/snap_ci/parallel_tests/test/cli_helper.rb', line 13 def (optparser, ) optparser.on('-p', '--pattern [PATTERN]', 'run tests matching this pattern') do |pattern| [:pattern] = /#{pattern}/ end end |