Sha256: 29f2007e180da85a08e24c31e0f8bd8578bf7979921837cbcfd12df91f4af244
Contents?: true
Size: 607 Bytes
Versions: 6
Compression:
Stored size: 607 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Unified class TestGroup def initialize(path, **opts) if String === path data = YAML.load(File.read(path)) else data = path end @spec = BSON::ExtJSON.parse_obj(data) @options = opts end attr_reader :options def tests reqs = @spec['runOnRequirements'] @spec.fetch('tests').map do |test| sub = @spec.dup sub.delete('tests') sub['test'] = test sub['group_runOnRequirements'] = reqs Test.new(sub, **options) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems