Sha256: 59912766677c94031c275b09832efbda79e019f753daf509805c2f7b0e1ff408
Contents?: true
Size: 759 Bytes
Versions: 6
Compression:
Stored size: 759 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' require 'pp' def run_tests(pattern='test/test*.rb', log_enabled=false) Dir["#{pattern}"].each { |fn| puts fn if log_enabled begin load fn rescue Exception => ex puts "Error in #{fn}: #{ex.message}" puts ex.backtrace assert false end } end # You can run the unit tests by running this file directly, providing a pattern. For example, # # ruby scripts/runtests.rb spec # # will load just the "test/test_specification.rb" unit test (unless others match as well). if $0 == __FILE__ $:.unshift 'lib' # Must run this from the root directory. pattern = ARGV.shift if pattern pattern = "test/*#{pattern}*.rb" run_tests(pattern, true) else run_tests end end
Version data entries
6 entries across 6 versions & 1 rubygems