Sha256: aa7d7df1030dbb0810e2d8624b3b699ab9e1d70e7207333b07e0572395caed8e

Contents?: true

Size: 781 Bytes

Versions: 1

Compression:

Stored size: 781 Bytes

Contents

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

Example: #{opts.program_name} spec/models spec/controllers/foo_controller_spec.rb -- --format documentation --fail-fast
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 `rspec --help' for supported rspec 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/rspec/cli_helper.rb