public
Description: adds additional features to friendly fixtures
Homepage: http://blog.internautdesign.com/2007/12/10/friendly_fixtures-plugin-for-rails
Clone URL: git://github.com/dfl/friendly_fixtures.git
dfl (author)
Tue Jun 10 23:46:15 -0700 2008
commit  b75aed37c96775e1a5af4edb317345fec244a745
tree    dd518611874290e6e7155dfd656791558dc0e0f3
parent  18fd9bf5ce084267c686ff1d6cb469f6a1b95b63
name age message
file LICENSE Loading commit data...
file README.rdoc
file Rakefile
file TODO
file init.rb
directory lib/
directory test/
README.rdoc

FriendlyFixtures

This plugin adds some extra features to the fixtures macro in Test::Unit. It is intended for Rails 2.x, but works with 1.2.3 as well.

It enables you to:

  • load dependent models, which are found by object introspection on a model’s ActiveRecord associations.
  • assert that all the loaded fixtures are valid. Intended to be used in unit tests, this can be very helpful in finding bugs.

Example Usage:

class SomeTest < Test::Unit::TestCase

  fixtures :user, :dependencies => true, :validate => true

end

Contact

David Lowenfels <david at internautdesign.com>