Class: JunitReportGenerator::Report
- Inherits:
-
Object
- Object
- JunitReportGenerator::Report
- Defined in:
- lib/junit_report_generator/report.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(test_suites) ⇒ Report
constructor
A new instance of Report.
- #publish(file) ⇒ Object
Constructor Details
#initialize(test_suites) ⇒ Report
Returns a new instance of Report.
5 6 7 |
# File 'lib/junit_report_generator/report.rb', line 5 def initialize(test_suites) @test_suites = test_suites end |
Class Method Details
.on(test_suites) ⇒ Object
10 11 12 |
# File 'lib/junit_report_generator/report.rb', line 10 def on(test_suites) new(test_suites) end |
Instance Method Details
#publish(file) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/junit_report_generator/report.rb', line 15 def publish(file) xml = Generator.produce(@test_suites) File.open(file, 'w') do |f| f.puts xml end end |