How does one run dm-migrations from rspec config?

9 views
Skip to first unread message

Yuri

unread,
Mar 14, 2011, 12:11:25 PM3/14/11
to DataMapper
How does one run dm-migrations from rspec as part of before :all or
similar?

My first thought was to require dm-migrations, load the migration
files, and then run migrate_up! (borrowing from how dm-rails does it
in Rake) but that doesn't seem to load the migrations into the right
array, perhaps because migration_runner is included by whatever first
required it and stores the migrations list in @@migrations?

Is there a recommended (or not) way to run migrations files before an
Rspec run?
Reply all
Reply to author
Forward
0 new messages