Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cfb3227c5b
Fetching contributors…

Cannot retrieve contributors at this time

file 33 lines (27 sloc) 0.862 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
require 'test_helper'

class OptionsTest < MTest
  def test_short_help_option
    output = m('-h')
    assert_output /^Usage: m \[OPTIONS\] \[FILES\]/, output
  end

  def test_long_help_option
    output = m('--help')
    assert_output /^Usage: m \[OPTIONS\] \[FILES\]/, output
  end

  def test_verbose_option
    output = m('--version')
    assert_output /^m #{M::VERSION}/, output
  end

  def test_short_line_option
    output = m('-l19 examples/minitest_example_test.rb')
    assert_output /1 tests, 1 assertions/, output
  end

  def test_long_line_option
    output = m('--line 19 examples/minitest_example_test.rb')
    assert_output /1 tests, 1 assertions/, output
  end

  def test_line_option_has_precedence_over_colon_format
    output = m('--line 19 examples/minitest_example_test.rb:2')
    assert_output /1 tests, 1 assertions/, output
  end
end
Something went wrong with that request. Please try again.