Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ERB fixture info to README

  • Loading branch information...
commit cd0d74834cdb989c0ee83c0d679e1736951b171e 1 parent 1c10944
@jeremyevans authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 README
@@ -18,8 +18,7 @@ the following features:
== Installation
- sudo gem install jeremyevans-fixture_dependencies \
- --source
+ gem install fixture_dependencies
== Source
@@ -92,6 +91,16 @@ nx7010, and a vendors fixture with the name lxg_computers.
Fixture files still use the table_name of the model.
+== ERB Fixtures
+Fixtures can also use ERB to preprocess the fixture file, useful if you need
+to do any programming inside the fixture file, such as looping to create
+multiple records. For the ERB support to be invoked, your fixture file
+should be named #{table_name}.yml.erb instead of #{table_name}.yml. You can
+mix ERB fixture files and regular fixture files, but you can not have an
+ERB fixture file and a regular fixture file for the same table (the regular
+fixture file will be used in that case).
== Changes to the fixtures Class Method:
fixture_dependencies can still use the fixtures class method in your test:
Please sign in to comment.
Something went wrong with that request. Please try again.