Sha256: e7768b077b7489494bb31d3571c7217d9e3cc3348ba3c57d5a9bfa782aed94dc

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 Bytes

Contents

require 'coveralls'
Coveralls.wear_merged!

module Testable
  def m(arguments)
    Dir.chdir("test") do
      `ruby -I../lib  -I. ../bin/m #{arguments} 2>&1`.strip
    end
  end

  def assert_output(regexp, output)
    assert $?.success?, "Execution failed, output:\n\n#{output}"
    assert_match regexp, output
  end
end

require 'm'
require 'minitest/autorun'
if M::Frameworks.test_unit?
  require 'test/unit'
  require 'active_support/test_case'

  class MTest < Test::Unit::TestCase
    include ::Testable
  end
elsif M::Frameworks.minitest5?
  class MTest < Minitest::Test
    include ::Testable
  end
else
  class MTest < MiniTest::Unit::TestCase
    include ::Testable
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
m-1.3.4 test/test_helper.rb