Sha256: 4c20609f21f5aad6096a9cf3be027e7e88e7679d20a0d5ec7faff9e2da713bae

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'

RSpec.describe Generative::ORDERING do
  let(:ordering) { Generative::ORDERING }

  around do |example|
    previous = ENV['GENERATIVE_COUNT']
    ENV['GENERATIVE_COUNT'] = '10'

    example.call

    ENV['GENERATIVE_COUNT'] = previous
  end

  it "does not duplicate regular specs" do
    spec = double(metadata: {})
    expect(ordering.call([spec])).to eq([spec])
  end

  it "duplicates generative specs" do
    spec = double(metadata: { generative: true })
    expect(ordering.call([spec]).count).to eq(10)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generative-0.2.5 spec/generative/ordering_spec.rb