Sha256: 4ec46fc5b4303c95d5bcae3c94dcebf905d9006b556ed0a8ca84167fba0ec7a9
Contents?: true
Size: 902 Bytes
Versions: 2
Compression:
Stored size: 902 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require 'pad_utils' require 'PADGEM_GEM_RUBY_NAME' require_relative 'helper' start_time = Time.now number_of_tests = 0 errors_list = [] puts PadUtils.puts_c "Running tests...", :blue Dir["units/*_test.rb"].each do |file| require_relative file class_name = get_class_name(file) clazz = Object.const_get(class_name) c = clazz.new(class_name) errors = c.run if errors[:errors] > 0 errors_list << errors end number_of_tests += 1 end end_time = Time.now PadUtils.puts_c "Finished running #{number_of_tests} tests in #{time_diff_sec start_time, end_time} seconds", :blue if errors_list.length > 0 PadUtils.puts_c "--> Failed (#{errors_list.length}): ", :error errors_list.each do |err| PadUtils.puts_c "- #{err[:name]}: #{err[:errors]} error(s)" end else PadUtils.puts_c "--> 0 errors", :green end puts
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pad_gem-1.1.1 | lib/foundation/test/test_runner.rb |
pad_gem-1.1.0 | lib/foundation/test/test_runner.rb |