Sha256: 3f79209d3eabb91cb4984e4e01fe092dfe31a695ff8a3961e702e05a0d8c2f00

Contents?: true

Size: 336 Bytes

Versions: 6

Compression:

Stored size: 336 Bytes

Contents

Generative::ORDERING = ->(examples) {
  generative, regular = examples.partition { |example|
    example.metadata[:generative]
  }

  number_of_examples = ENV.fetch('GENERATIVE_COUNT', '1').to_i

  regular + generative * number_of_examples
}

RSpec.configure do |rspec|
  rspec.register_ordering(:generative, &Generative::ORDERING)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
generative-0.2.5 lib/generative/ordering.rb
generative-0.2.4 lib/generative/ordering.rb
generative-0.2.3 lib/generative/ordering.rb
generative-0.2.2 lib/generative/ordering.rb
generative-0.2.0 lib/generative/ordering.rb
generative-0.2.0.pre3 lib/generative/ordering.rb