dm-fixtures

A rip of some of ActiveRecord’s fixtures helpers, ported to DataMapper. For the conservative/slow adopters of dm-sweatshop.

Install & Run

# Gemfile
# Put dm-fixtures in dev + test to make its rake tasks available by default - only in :test is not available at the command line
group :development, :test do
  gem 'dm-fixtures', :require => 'dm-fixtures'
end

# Rails project test/test_helper.rb
require 'dm-fixtures'
...
fixtures :all

# This will load all the fixtures via test:prepare and run all tests
$ RAILS_ENV=test bundle exec rake test

# In addition, this will run only unit tests and show backtraces
$ RAILS_ENV=test BACKTRACE=yes bundle exec rake test:units

Contributing to dm-fixtures

Support

This is open source, so feel free to branch. Admittedly, this does not fix the issue of updating the authoritative repo/official gem. So, I commit to maintaining this branch, and if I no longer am able to, or want to do that, I’ll transfer responsibility - just shoot me an e-mail.

Copyright © 2012 Phill Baker. See LICENSE for further details (MIT).