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