Sha256: 3af6ab8894d532621fcab187d342dbbcb359573e063437b12cb6605d446ebc4b

Contents?: true

Size: 710 Bytes

Versions: 12

Compression:

Stored size: 710 Bytes

Contents

module KnapsackPro
  module Runners
    class TestUnitRunner < BaseRunner
      def self.run(args)
        ENV['KNAPSACK_PRO_TEST_SUITE_TOKEN'] = KnapsackPro::Config::Env.test_suite_token_test_unit
        ENV['KNAPSACK_PRO_RECORDING_ENABLED'] = 'true'

        runner = new(KnapsackPro::Adapters::TestUnitAdapter)

        if runner.test_files_to_execute_exist?
          require 'test/unit'

          cli_args =
            (args || '').split +
            runner.test_file_paths.map do |f|
              File.expand_path(f)
            end

          exit ::Test::Unit::AutoRunner.run(
            true,
            runner.test_dir,
            cli_args
          )
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
knapsack_pro-2.10.1 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.10.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.9.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.8.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.7.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.6.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.5.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.4.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.3.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.2.1 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.2.0 lib/knapsack_pro/runners/test_unit_runner.rb
knapsack_pro-2.1.1 lib/knapsack_pro/runners/test_unit_runner.rb