Check for minitest first #18

Merged
merged 1 commit into from Jul 31, 2012
Jump to file
+6 −6
Split
View
@@ -160,10 +160,10 @@ def execute
test_arguments = ["-n", "/(#{test_names})/"]
# directly run the tests from here and exit with the status of the tests passing or failing
- if defined?(Test)
- exit Test::Unit::AutoRunner.run(false, nil, test_arguments)
- elsif defined?(MiniTest)
+ if defined?(MiniTest)
exit MiniTest::Unit.runner.run test_arguments
+ elsif defined?(Test)
+ exit Test::Unit::AutoRunner.run(false, nil, test_arguments)
else
not_supported
end
@@ -196,10 +196,10 @@ def suites
end
# Figure out what test framework we're using
- if defined?(Test)
- suites = Test::Unit::TestCase.test_suites
- elsif defined?(MiniTest)
+ if defined?(MiniTest)
suites = MiniTest::Unit::TestCase.test_suites
+ elsif defined?(Test)
+ suites = Test::Unit::TestCase.test_suites
else
not_supported
end