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
Sounds like your take task may need the Rails environment to be loaded. You can stub this out by adding this line to your before(:all) hook:
Rake::Task.define_task(:environment)