Hey guys,
I'd like to be able to override the default test task with something that starts the dependencies required for testing our app. I've been googling a bit and playing around with rake but I can't get it to play ball.
I put a file in lib/tasks/testing.rake with the following command.
Does anyone know a solution for doing something like this? I'm sure this must be a common thing
Thanks, Dave
desc 'Test all units and functionals' task :test do puts "Starting ferret server..." system "RAILS_ENV=test script/ferret_start" exceptions = ["test:units", "test:functionals", "test:integration"].collect do |task| begin Rake::Task[task].invoke nil rescue => e e end end.compact
exceptions.each {|e| puts e;puts e.backtrace } raise "Test failures" unless exceptions.empty? end