test/test_helper.rb in m-1.3.3 vs test/test_helper.rb in m-1.3.4
- old
+ new
@@ -1,33 +1,34 @@
-if ENV['TRAVIS']
- require 'coveralls'
+require 'coveralls'
+Coveralls.wear_merged!
- Coveralls.wear!
-end
-
module Testable
def m(arguments)
Dir.chdir("test") do
- `ruby -I../lib -I. ../bin/m #{arguments} 2>&1`.strip
+ `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 './lib/m'
+require 'm'
require 'minitest/autorun'
-if M::Frameworks.minitest5?
- class MTest < Minitest::Test
- include ::Testable
- end
-else
+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