add cucumber for integration testing and add a feature for statistics

refactor some stuff to support testing statistisc
This commit is contained in:
Reinier Balt 2009-04-13 22:26:20 +02:00
parent 058079a0a7
commit 43440eaf33
11 changed files with 286 additions and 5 deletions

15
lib/tasks/cucumber.rake Normal file
View file

@ -0,0 +1,15 @@
$LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib')
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty"
end
task :features => 'db:test:prepare'
rescue LoadError
desc 'Cucumber rake task not available'
task :features do
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
end
end