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-7.13.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.12.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.12.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.11.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.10.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.9.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.8.2 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.8.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.8.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.7.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.6.2 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.6.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.6.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.1.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.0.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-7.0.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-6.0.4 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-6.0.3 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-6.0.2 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-6.0.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb