Sha256: 8a32bd47a1457ff31b1c5ecadb23659aa95f7296a4cacd612dad95cea021f300

Contents?: true

Size: 862 Bytes

Versions: 88

Compression:

Stored size: 862 Bytes

Contents

describe KnapsackPro::TestCaseMergers::BaseMerger do
  describe '.call' do
    let(:test_files) { double }

    subject { described_class.call(adapter_class, test_files) }

    context 'when adapter_class is KnapsackPro::Adapters::RSpecAdapter' do
      let(:adapter_class) { KnapsackPro::Adapters::RSpecAdapter }

      it do
        result = double
        rspec_merger = instance_double(KnapsackPro::TestCaseMergers::RSpecMerger, call: result)
        expect(KnapsackPro::TestCaseMergers::RSpecMerger).to receive(:new).with(test_files).and_return(rspec_merger)

        expect(subject).to eq result
      end
    end

    context 'when adapter_class is unknown' do
      let(:adapter_class) { 'fake-adapter' }

      it do
        expect { subject }.to raise_error 'Test case merger does not exist for adapter_class: fake-adapter'
      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
knapsack_pro-2.18.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.18.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.17.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.16.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.15.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.14.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.13.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.12.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.11.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.10.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.10.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.9.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.8.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.7.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.6.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.5.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.4.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.3.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.2.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-2.2.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb