Commit cf7935bc3e0f179cc29f30097b10c36ef8a9b6b2
1 parent
82bb98a2
Exists in
master
and in
29 other branches
Run all test tasks on `rake test` (and `rake`)
The skeleton was copied from Rails' own :test implementation, but I added the :cucumber and :selenium tasks.
Showing
1 changed file
with
13 additions
and
1 deletions
Show diff stats
lib/tasks/test.rake
1 | -task :default => [:test, :cucumber, :selenium] | 1 | +Rake::Task[:test].clear |
2 | + | ||
3 | +task :test do | ||
4 | + errors = %w(test:units test:functionals test:integration cucumber selenium).collect do |task| | ||
5 | + begin | ||
6 | + Rake::Task[task].invoke | ||
7 | + nil | ||
8 | + rescue => e | ||
9 | + task | ||
10 | + end | ||
11 | + end.compact | ||
12 | + abort "Errors running #{errors.to_sentence}!" if errors.any? | ||
13 | +end | ||
2 | 14 | ||
3 | desc 'Runs Seleniun acceptance tests' | 15 | desc 'Runs Seleniun acceptance tests' |
4 | task :selenium do | 16 | task :selenium do |