Class: MightyTest::OptionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/mighty_test/option_parser.rb

Instance Method Summary collapse

Instance Method Details

#parse(argv) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/mighty_test/option_parser.rb', line 5

def parse(argv)
  argv, literal_args = split(argv, "--")
  options, extra_args = parse_options!(argv)
  extra_args += parse_minitest_flags!(argv) unless options[:help]

  [argv + literal_args, extra_args, options]
end

#to_sObject



13
14
15
16
17
18
19
# File 'lib/mighty_test/option_parser.rb', line 13

def to_s
  <<~USAGE
    Usage: mt [--all]
           mt [test file...] [test dir...]
           mt --watch
  USAGE
end