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-6.0.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.7.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.6.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.5.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.4.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.4.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.5 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.4 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.3 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.2 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.3.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.2.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.2.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.1.2 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.1.1 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.1.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-5.0.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-4.1.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb
knapsack_pro-4.0.0 spec/knapsack_pro/test_case_mergers/base_merger_spec.rb