Source

kakuro-cross-sums / solver / ruby / Rakefile

Full commit
require 'rubygems'
require 'rspec/core/rake_task'

# require 'bundler/setup'
# Bundler::GemHelper.install_tasks

$DB_FILE = 'lib/kakuro_solver/perms_db.rb'
$GEN_DB = './bin/gen-kakuro-perms-db.rb'
file $DB_FILE => [$GEN_DB] do
    sh "ruby #{$GEN_DB} #{$DB_FILE}"
end

RSpec::Core::RakeTask.new(:spec) do |t|
    # t.spec_files = FileList['t/**/*.rb']
    t.pattern = 't/**/*_spec.rb'
    t.rspec_opts = ['--color']
end
# 
# Spec::Rake::SpecTask.new("rcov_spec") do |t|
#   t.spec_files = FileList['spec/**/*_spec.rb']
#   t.spec_opts = ['--color']
#   t.rcov = true
#   t.rcov_opts = ['--exclude', '^spec,/gems/']
# end
# 
# task :test => :spec

desc "Run specs as default activity"
task :default => :spec
task :test => :spec