generators/datamapper_install/templates/datamapper.rake in datamapper4rails-0.3.0 vs generators/datamapper_install/templates/datamapper.rake in datamapper4rails-0.3.1
- old
+ new
@@ -44,11 +44,13 @@
::DataMapper.auto_upgrade!
end
# this is needed for rspec and test tasks
namespace :test do
- RAILS_ENV = 'test'
- task :prepare => :automigrate
+ task :prepare do
+ RAILS_ENV='test'
+ Rake::Task['db:automigrate'].invoke
+ end
end
namespace :migrate do
task :load => :environment do
require 'dm-migrations/migration_runner'