Skip to content

Instantly share code, notes, and snippets.

@effkay
Created July 27, 2010 07:58
Show Gist options
  • Select an option

  • Save effkay/491917 to your computer and use it in GitHub Desktop.

Select an option

Save effkay/491917 to your computer and use it in GitHub Desktop.
BDD Rakefile
require 'rubygems'
require 'rake'
require 'cucumber/rake/task'
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |task|
task.spec_opts = ['--options', "spec/support/spec.opts"]
end
Cucumber::Rake::Task.new(:features)
Spec::Rake::SpecTask.new(:rcov) do |task|
task.spec_opts = ['--options', "spec/support/spec.opts"]
task.spec_files = FileList['lib/*']
task.rcov = true
task.rcov_opts = lambda do
IO.readlines('spec/support/rcov.opts').map { |line| line.chomp.split ' ' }.flatten
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment