Sha256: 93d0fc69fb0715495192deda4a996e0d0168f424cbf659c6cecef516eb31a208

Contents?: true

Size: 772 Bytes

Versions: 3

Compression:

Stored size: 772 Bytes

Contents

module Knapsack
  module Runners
    class MinitestRunner
      def self.run(args)
        allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::MinitestAdapter).allocator

        puts
        puts 'Report tests:'
        puts allocator.report_node_tests
        puts
        puts 'Leftover tests:'
        puts allocator.leftover_node_tests
        puts

        task_name = 'knapsack: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 << allocator.test_dir
          t.test_files = allocator.node_tests
          t.options = args
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
knapsack-1.8.0 lib/knapsack/runners/minitest_runner.rb
knapsack-1.7.0 lib/knapsack/runners/minitest_runner.rb
knapsack-1.6.1 lib/knapsack/runners/minitest_runner.rb