mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 01:08:50 +01:00
add cucumber for integration testing and add a feature for statistics
refactor some stuff to support testing statistisc
This commit is contained in:
parent
058079a0a7
commit
43440eaf33
11 changed files with 286 additions and 5 deletions
15
lib/tasks/cucumber.rake
Normal file
15
lib/tasks/cucumber.rake
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue