Sha256: 49863dbfa3bf445dbc68c6311a41e855373987a13093a8ba090e4e3002e11ff9
Contents?: true
Size: 558 Bytes
Versions: 18
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true require 'json' module GitlabQuality module TestTooling module TestResults class JsonTestResults < BaseTestResults def write json = results.merge('examples' => testcases.map(&:report)) File.write(path, JSON.pretty_generate(json)) end private def parse JSON.parse(File.read(path)) end def process results['examples'].map do |test| TestResult.from_json(test) end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems