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-5.5.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.4.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.4.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.5 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.4 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.3 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.2 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.3.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.2.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.2.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.1.2 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.1.1 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.1.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-5.0.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-4.1.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-4.0.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-3.11.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-3.10.0 lib/knapsack_pro/test_case_mergers/base_merger.rb
knapsack_pro-3.9.0 lib/knapsack_pro/test_case_mergers/base_merger.rb