How can I get the test tasks back?
Backstory: I didn’t start with the default new rails project. I’m using datamapper with dm-rails and used their boodstrap command:
rails new project_name -m http://datamapper.org/templates/rails.rb
My Rakefile is as follows:
require File.expand_path('../config/application', __FILE__)
require 'rake'
MyAppName::Application.load_tasks
In a default Rails 3 project,
config/application.rbcontainsrequire 'rails/all', basically requiring all of the rails frameworks (ActiveRecord, ActiveResource, ActionController, ActionMailer, TestUnit, etc.)The DataMapper template changes this. Since it doesn’t use ActiveRecord, it can’t
require 'rails/all'without causing problems. The only default Rails component it actually keeps is ActionController. It puts inrequirestatements for ActiveResource, ActionMailer, and TestUnit, but comments them out by default.Long story short: uncomment the following line in
config/application.rb: