Sha256: 7ec7a125f621e53f93f867034fbd4c31cac33d08d8eb9244af4b41b21b97a65a

Contents?: true

Size: 764 Bytes

Versions: 65

Compression:

Stored size: 764 Bytes

Contents

module KnapsackPro
  module TestCaseMergers
    class BaseMerger
      # values must be string to avoid circular dependency problem during loading files
      ADAPTER_TO_MERGER_MAP = {
        KnapsackPro::Adapters::RSpecAdapter => 'KnapsackPro::TestCaseMergers::RSpecMerger',
      }

      def self.call(adapter_class, test_files)
        merger_class =
          ADAPTER_TO_MERGER_MAP[adapter_class] ||
          raise("Test case merger does not exist for adapter_class: #{adapter_class}")
        Kernel.const_get(merger_class).new(test_files).call
      end

      def initialize(test_files)
        @test_files = test_files
      end

      def call
        raise NotImplementedError
      end

      private

      attr_reader :test_files
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
knapsack_pro-2.16.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.15.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.14.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.13.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.12.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.11.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.10.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.10.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.9.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.8.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.7.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.6.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.5.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.4.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.3.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.2.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.2.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.1.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.1.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-2.0.0 lib/knapsack_pro/test_case_mergers/base_merger.rb