Skip to content

Instantly share code, notes, and snippets.

@leehambley
Created June 8, 2009 13:50
Show Gist options
  • Save leehambley/125823 to your computer and use it in GitHub Desktop.
Save leehambley/125823 to your computer and use it in GitHub Desktop.
begin
tags = ['~@slow', '~@stable']
namespace :cucumber do
Cucumber::Rake::Task.new(:webrat) do |t|
t.profile = "webrat"
end
task :webrat => 'db:test:prepare'
end
desc "shortcut for cucumber:webrat"
task :features => 'cucumber:webrat'
namespace :features do
Cucumber::Rake::Task.new(:quick, "Run quick Cucumber features -slow, -stable") do |t|
t.profile = "webrat"
t.cucumber_opts = '--tags ~@slow,~@stable'
end
task :features_rcov => 'db:test:prepare'
Cucumber::Rake::Task.new(:rcov, "Run Cucumber features with RCov") do |t|
t.profile = "webrat"
t.rcov = true
t.rcov_opts << '-o coverage'
t.rcov_opts << '--text-report'
t.rcov_opts << '--exclude features\/,spec\/'
t.rcov_opts << '--sort coverage'
end
task :features_rcov => 'db:test:prepare'
namespace :rcov do
Cucumber::Rake::Task.new(:redundant, "Search for unused step definitions using RCov") do |t|
t.profile = "webrat"
t.rcov = true
t.rcov_opts << '-o coverage'
t.rcov_opts << '--text-report'
t.rcov_opts << '--exclude spec\/'
t.rcov_opts << '--sort coverage'
end
task :redundant => 'db:test:prepare'
end
end
rescue NameError
puts $!
end
$ rake gems
(in /Users/leehambley/example.com/)
uninitialized constant Cucumber
Missing source files, have you tried `rake gems:install` no such file to load -- cucumber/rake/task
- [ ] haml-edge = 2.1.12
- [ ] chriseppstein-compass = 0.6.15
- [I] sqlite3-ruby = 1.2.4
- [I] diabolo-webrat = 0.4.4.2
- [I] nokogiri >= 1.2.0
- [ ] rspec-rails = 1.2.6
- [ ] rspec = 1.2.6
- [ ] cucumber = 0.3.9
- [ ] rcov
- [I] raldred-coderay
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
require 'tasks/rails'
begin
require 'cucumber/rake/task'
rescue LoadError
puts "Missing source files, have you tried \`rake gems:install\` #{$!}"
end
config.gem "haml-edge", :lib => 'haml', :version => '=2.1.12'
config.gem "chriseppstein-compass", :lib => 'compass', :version => '=0.6.15'
config.gem "sqlite3-ruby", :lib => 'sqlite3', :version => '=1.2.4'
config.gem "diabolo-webrat", :lib => 'webrat', :version => '=0.4.4.2', :env => 'test'
config.gem "rspec-rails", :lib => 'spec/rails', :version => '=1.2.6', :env => 'test'
config.gem "rspec", :lib => "spec", :version => '=1.2.6', :env => 'test'
config.gem "cucumber", :version => '=0.3.9', :env => 'test'
config.gem "rcov", :env => 'test'
config.gem "raldred-coderay", :lib => 'coderay', :env => 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment