YAML Cookbook 3
While researching what some of the YAML syntax was doing in Ben Bleything's article on DRY'ing up your database config, I ran across the YAML Cookbook. I've only ever used YAML for my database.yml and test fixtures, so I was really surprised to see the power YAML affords the Ruby programmer. Check it out, you will find a few things useful in your fixtures and I'm sure other ideas on it's use will come to you as you see how powerful it is.
Comments
-
I tried to use references to do some DRY in fixtures, and quickly abandonned it : ref: &ref name: test user role: user joe_user: uid: 0 mail: joe@joe.com jack@jack.com joe@joe.com name: test_user role: user jack_user: jack@jack.com If you have had success in using the : * syntax to do DRY in fixtures would you ming posting a quick recipe as a future blog post ? thanks
-
I tried to use references to do some DRY in fixtures, and quickly abandonned it : ref: &ref name: test user role: user joe_user: uid: 0 mail: joe@joe.com jack@jack.com joe@joe.com name: test_user role: user jack_user: jack@jack.com If you have had success in using the : * syntax to do DRY in fixtures would you ming posting a quick recipe as a future blog post ? thanks
-
Cheese is where the home is.