Class: Gitlab::QA::Report::JUnitTestResults
- Inherits:
-
Object
- Object
- Gitlab::QA::Report::JUnitTestResults
- Includes:
- Enumerable
- Defined in:
- lib/gitlab/qa/report/junit_test_results.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(file) ⇒ JUnitTestResults
constructor
A new instance of JUnitTestResults.
Constructor Details
#initialize(file) ⇒ JUnitTestResults
Returns a new instance of JUnitTestResults.
11 12 13 |
# File 'lib/gitlab/qa/report/junit_test_results.rb', line 11 def initialize(file) @testcases = Nokogiri::XML(File.read(file)).xpath('//testcase').map { |test| TestResult.from_junit(test) } end |
Instance Method Details
#each(&block) ⇒ Object
15 16 17 |
# File 'lib/gitlab/qa/report/junit_test_results.rb', line 15 def each(&block) @testcases.each(&block) end |