Sha256: e549294ff84d7f669e78b434126a2dcf91cb5ca53f3f8c28a10f9ee854b93732
Contents?: true
Size: 756 Bytes
Versions: 41
Compression:
Stored size: 756 Bytes
Contents
module Bozo::TestRunners class Runit def initialize @paths = [] end def path(path) @paths << path end def execute require 'test/unit' test_files = [] @paths.each do |p| Dir[p].select {|f| (File.extname f) == '.rb'}.each {|f| test_files << f} end # raise an error if no test files were found. This may indicate a configuration issue raise Bozo::ConfigurationError.new "No tests found" unless test_files.any? raise Bozo::ExecutionError.new(:runit, test_files, -1) unless execute_tests test_files end private def execute_tests(test_files) Test::Unit::AutoRunner.run(true, nil, test_files) end end end
Version data entries
41 entries across 41 versions & 2 rubygems