Class: CI::Reporter::ReportManager
- Inherits:
-
Object
- Object
- CI::Reporter::ReportManager
- Defined in:
- lib/ci/reporter/report_manager.rb
Instance Method Summary collapse
-
#initialize(prefix) ⇒ ReportManager
constructor
A new instance of ReportManager.
- #write_report(suite) ⇒ Object
Constructor Details
#initialize(prefix) ⇒ ReportManager
Returns a new instance of ReportManager.
11 12 13 14 15 |
# File 'lib/ci/reporter/report_manager.rb', line 11 def initialize(prefix) @basedir = ENV['CI_REPORTS'] || File.("#{Dir.getwd}/#{prefix.downcase}/reports") @basename = "#{prefix.upcase}" FileUtils.mkdir_p(@basedir) end |
Instance Method Details
#write_report(suite) ⇒ Object
17 18 19 20 21 |
# File 'lib/ci/reporter/report_manager.rb', line 17 def write_report(suite) File.open(filename(suite.name), "w") do |f| f << suite.to_xml end end |