method
setup_options

v1_9_3_125 -
Show latest stable
-
0 notes -
Class: Options
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
setup_options(opts, options)
private
Hide source
# File lib/test/unit.rb, line 63 def setup_options(opts, options) opts.separator 'minitest options:' opts.version = MiniTest::Unit::VERSION opts.on '-h', '--help', 'Display this help.' do puts opts exit end opts.on '-s', '--seed SEED', Integer, "Sets random seed" do |m| options[:seed] = m end opts.on '-v', '--verbose', "Verbose. Show progress processing files." do options[:verbose] = true self.verbose = options[:verbose] end opts.on '-n', '--name PATTERN', "Filter test names on pattern." do |a| options[:filter] = a end opts.on '--jobs-status [TYPE]', [:normal, :replace], "Show status of jobs every file; Disabled when --jobs isn't specified." do |type| options[:job_status] = type || :normal end opts.on '-j N', '--jobs N', "Allow run tests with N jobs at once" do |a| if /^t/ =~ a options[:testing] = true # For testing options[:parallel] = a[1..-1].to_i else options[:parallel] = a.to_i end end opts.on '--no-retry', "Don't retry running testcase when --jobs specified" do options[:no_retry] = true end opts.on '--ruby VAL', "Path to ruby; It'll have used at -j option" do |a| options[:ruby] = a.split(/ /).reject(&:empty?) end opts.on '-q', '--hide-skip', 'Hide skipped tests' do options[:hide_skip] = true end end