Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_1_10) is shown here.
_run_anything(type)
public
Runner for a given type (eg,
test vs bench).
Show source
def _run_anything type
suites = TestCase.send "#{type}_suites"
return if suites.empty?
start = Time.now
puts
puts "# Running #{type}s:"
puts
@test_count, @assertion_count = 0, 0
sync = output.respond_to? :"sync="
old_sync, output.sync = output.sync, true if sync
results = _run_suites suites, type
@test_count = results.inject(0) { |sum, (tc, _)| sum + tc }
@assertion_count = results.inject(0) { |sum, (_, ac)| sum + ac }
output.sync = old_sync if sync
t = Time.now - start
puts
puts
puts "Finished #{type}s in %.6fs, %.4f tests/s, %.4f assertions/s." %
[t, test_count / t, assertion_count / t]
report.each_with_index do |msg, i|
puts "\n%3d) %s" % [i + 1, msg]
end
puts
status
end