I\'m trying to test a rake task and it uses an active record in it.
require \'spec_helper\' require \'rake\' load File.join(Rails.root, \'lib\', \'tasks\', \'su
I think you should first load the tasks:
require 'rake' MyRailsApp::Application.load_tasks
and then invoke your task:
Rake::Task['survey:send_report'].invoke