I like these fixtures files I am writing for the testing units. That
makes a lot of sense to me.
As I get to about the 60% point in my little web-application-to-learn-
rails, I have started to do little demonstrations. “See, you login
here, then you look for a student, assign them to your ‘parent’ sheet,
then put in your emergency contacts like this…” and I realize that
what I REALLY want (what I really really want) is to be able to reset
the database to a demonstration position. So I don’t have to delete
associations and start from a blank page again to show it off.
The testing stuff is a little opaque to me.
If I wrote a bunch of fixture files, is there a simple way to say,
“Dump the records out of the tables in the db, load these in for the
demonstration…” or should I just start writing a script that empties
the tables and reads in the YAML files manually?
I’d hate to be duplicating work that’s already sitting in this clever,
shiny machine I’ve installed on my iMac.