Module: RSpec::Abq::Manifest

Defined in:
lib/rspec/abq/manifest.rb

Overview

A module for abstracting ABQ Manifest

Class Method Summary collapse

Class Method Details

.generate(ordered_groups, random_seed, registry) ⇒ Object

Generates an ABQ Manifest

Parameters:

  • ordered_groups (Array<RSpec::Core::ExampleGroup>)

    ordered groups to assemble into a manifest



13
14
15
16
17
18
19
20
21
22
# File 'lib/rspec/abq/manifest.rb', line 13

def self.generate(ordered_groups, random_seed, registry)
  {
    type: "manifest_success",
    manifest: {
      init_meta: RSpec::Abq::Ordering.to_meta(random_seed, registry),
      members: ordered_groups.map { |group| to_manifest_group(group) }.compact
    },
    other_errors: nil
  }
end

.write_manifest(ordered_groups, random_seed, registry) ⇒ Object

writes manifest to abq socket



7
8
9
# File 'lib/rspec/abq/manifest.rb', line 7

def self.write_manifest(ordered_groups, random_seed, registry)
  Abq.protocol_write(generate(ordered_groups, random_seed, registry))
end