Sha256: e56fab3e88613d021cc2b0c1ac782bd5b1be8021c88c13f1a60ed61e0de87e73

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

module SnapCI
  module ParallelTests
    module Test
      module CLIHelper
        def render_header(optparser, options)
          optparser.banner = <<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

        def render_options(optparser, options)
          optparser.on('-p', '--pattern [PATTERN]', 'run tests matching this pattern') do |pattern|
            options[:pattern] = /#{pattern}/
          end
        end

        def render_footer(optparser, options)
          optparser.separator "\nRun `ruby -r test/test_helper -e1 --help' for supported Test::Unit or MiniTest options."
        end

        extend CLIHelper
      end #CLIHelper

    end #Test
  end #ParallelTests
end #SnapCI

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
snap_ci-parallel_tests-0.1.0 lib/snap_ci/parallel_tests/test/cli_helper.rb
snap_ci-parallel_tests-0.0.3 lib/snap_ci/parallel_tests/test/cli_helper.rb
snap_ci-parallel_tests-0.0.2 lib/snap_ci/parallel_tests/test/cli_helper.rb