Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 34 lines (27 sloc) 0.862 kb
311ea36 @cldwalker add -h/--help using optparse, closes #8
cldwalker authored
1 require 'test_helper'
2
3 class OptionsTest < MTest
4 def test_short_help_option
5 output = m('-h')
6 assert_output /^Usage: m \[OPTIONS\] \[FILES\]/, output
7 end
8
9 def test_long_help_option
10 output = m('--help')
11 assert_output /^Usage: m \[OPTIONS\] \[FILES\]/, output
12 end
13
14 def test_verbose_option
15 output = m('--version')
16 assert_output /^m #{M::VERSION}/, output
17 end
cfb3227 @cldwalker add line option, closes #9
cldwalker authored
18
19 def test_short_line_option
20 output = m('-l19 examples/minitest_example_test.rb')
21 assert_output /1 tests, 1 assertions/, output
22 end
23
24 def test_long_line_option
25 output = m('--line 19 examples/minitest_example_test.rb')
26 assert_output /1 tests, 1 assertions/, output
27 end
28
29 def test_line_option_has_precedence_over_colon_format
30 output = m('--line 19 examples/minitest_example_test.rb:2')
31 assert_output /1 tests, 1 assertions/, output
32 end
311ea36 @cldwalker add -h/--help using optparse, closes #8
cldwalker authored
33 end
Something went wrong with that request. Please try again.