Sha256: f293eed53cdaf881ee2608dce910d546c07bd150940c22efc06cbf5a817739ae

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

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

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

        task_name = 'knapsack_pro:minitest_run'

        if Rake::Task.task_defined?(task_name)
          Rake::Task[task_name].clear
        end

        Rake::TestTask.new(task_name) do |t|
          t.warning = false
          t.libs << runner.test_dir
          t.test_files = runner.test_file_paths
          t.options = args
        end

        Rake::Task[task_name].invoke
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
knapsack_pro-0.14.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.13.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.12.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.11.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.10.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.9.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.8.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.7.2 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.7.1 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.7.0 lib/knapsack_pro/runners/minitest_runner.rb
knapsack_pro-0.6.1 lib/knapsack_pro/runners/minitest_runner.rb