Sha256: 7d185151ed7f0152ac282732c5a05da2caec078e3781cfa74e548dc71d72add6

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

require 'test_helper'

if M::Frameworks.minitest4?
  class Minitest4Test < MTest
    def test_run_simple_test_by_line_number
      output = m('examples/minitest_4_example_test.rb:19')
      assert_output(/1 tests, 1 assertions/, output)
    end

    def test_runs_entire_test_without_line_number
      output = m('examples/minitest_4_example_test.rb')
      assert_output(/3 tests/, output)
    end

    def test_run_inside_of_test
      output = m('examples/minitest_4_example_test.rb:20')
      assert_output(/1 tests, 1 assertions/, output)
    end

    def test_run_on_end_of_test
      output = m('examples/minitest_4_example_test.rb:21')
      assert_output(/1 tests, 1 assertions/, output)
    end

    def test_run_inside_big_test
      output = m('examples/minitest_4_example_test.rb:26')
      assert_output(/1 tests, 6 assertions/, output)
    end

    def test_run_on_blank_line
      output = m('examples/minitest_4_example_test.rb:2')

      assert !$?.success?
      assert_match(/No tests found on line 2. Valid tests to run:/, output)
      assert_match %r{    test_that_kitty_can_eat: m examples/minitest_4_example_test\.rb:19}, output
      assert_match %r{test_that_it_will_not_blend: m examples/minitest_4_example_test\.rb:23}, output
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
m-1.6.1 test/minitest_4_test.rb
m-1.6.0 test/minitest_4_test.rb
m-1.5.1 test/minitest_4_test.rb
m-1.5.0 test/minitest_4_test.rb
m-1.4.2 test/minitest_4_test.rb
m-1.4.0 test/minitest_4_test.rb
m-1.3.4 test/minitest_4_test.rb