Sha256: b6170768120eb3bd9597d4828df868924ef7148138110e7c74944137b4f2761f

Contents?: true

Size: 822 Bytes

Versions: 1

Compression:

Stored size: 822 Bytes

Contents

module SnapCI
  module ParallelTests
    module Test
      module CLIHelper
        def render_header(opts)
          opts.banner = <<BANNER
Usage: #{opts.program_name} [options] [files or directories] [-- [Test::Unit or MiniTest options]]

Example: #{opts.program_name} test/models test/controllers/foo_controller_test.rb -- --verbose --seed 10
BANNER
        end

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

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

        extend CLIHelper
      end #CLIHelper

    end #RSpec
  end #ParallelTests
end #SnapCI

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
snap_ci-parallel_tests-0.0.1 lib/snap_ci/parallel_tests/test/cli_helper.rb