13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/sauce-test/runner.rb', line 13
def run(opts = nil)
options = opts || SauceTest::Runner::Options.new
case options.test_type
when :unit then runner = SauceTest::TestUnit::Runner
when :spec then runner = SauceTest::RSpec::Runner
end
report = runner.run(options)
YAML.dump(report.to_hash, $stdout)
if report_name = options.report_file and !options.list
FileUtils.mkdir_p File.dirname(report_name)
File.new(report_name, 'w') << report.to_html
end
end
|