Sha256: ca550114e33b0ca7c5af7e3c6e1ba52b83c2e8c339565ae6e5d267a8e27fcbfd

Contents?: true

Size: 614 Bytes

Versions: 12

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

module Unified

  class TestGroup
    def initialize(path, **opts)
      if String === path
        data = ::Utils.load_spec_yaml_file(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

12 entries across 12 versions & 1 rubygems

Version Path
mongo-2.16.4 spec/runners/unified/test_group.rb
mongo-2.17.4 spec/runners/unified/test_group.rb
mongo-2.18.3 spec/runners/unified/test_group.rb
mongo-2.18.2 spec/runners/unified/test_group.rb
mongo-2.17.3 spec/runners/unified/test_group.rb
mongo-2.18.1 spec/runners/unified/test_group.rb
mongo-2.18.0 spec/runners/unified/test_group.rb
mongo-2.17.2 spec/runners/unified/test_group.rb
mongo-2.16.3 spec/runners/unified/test_group.rb
mongo-2.18.0.beta1 spec/runners/unified/test_group.rb
mongo-2.16.2 spec/runners/unified/test_group.rb
mongo-2.17.1 spec/runners/unified/test_group.rb