Sha256: fea1687d029772b5917b4dd3cc882e1cdf1bc353a5da8c99fed5d2ebf9b8b360

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

require 'knapsack'

namespace :knapsack do
  task :rspec do
    allocator = Knapsack::Allocator.new

    puts
    puts 'Report specs:'
    puts allocator.report_node_specs
    puts
    puts 'Leftover specs:'
    puts allocator.leftover_node_specs
    puts

    custom_spec_dir = allocator.custom_spec_dir
    default_path = custom_spec_dir ? "--default-path #{custom_spec_dir}" : nil
    cmd = %Q[bundle exec rspec #{default_path} -- #{allocator.stringify_node_specs}]

    exec(cmd)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
knapsack-0.1.1 lib/tasks/knapsack.rake
knapsack-0.1.0 lib/tasks/knapsack.rake