Source

chickumber / Rakefile

# 
# %%HEADER%%
# 

require 'rake'


def with_working_dir(dir)
  old_dir = Dir.pwd
  Dir.chdir(dir)
  yield if block_given?
ensure 
  Dir.chdir(old_dir) if old_dir
end


desc "run unit tests"
task :tests do
  with_working_dir(File.join(File.dirname(__FILE__),"tests")) do
    system("csi -s run.scm")
  end
end

namespace :features do
  desc "Run features using dk profile"
  task :dk do
    system("bundle exec cucumber -p dk")
  end
  
  desc "Run all features"
  task :all do
    system("bundle exec cucumber")
  end
  
  desc "Run all features tagged for david"
  task :david do
    system("bundle exec cucumber --tags @david")
  end
end

desc "Remove compiled files"
task :cleanup do
  `rm -r *.so *.import.scm`
end