I had noticed that fixtures become hard to use in big projects,
particularly for functional testing. I was thinking about implementing
in core rails something in the lines of:
- Named fixtures. You could name your fixture after what it provides,
not necessarily after the table name. Examples of fixtures names would
be: default_user_accounts, test_products, sell_history.
- Fixture dependencies. You could say that one of your fixtures
"depends" on others, this way, they would all get loaded automatically
whenever you load the "dependent". The loading would use standard
topological sort to satisfy all dependencies. Maybe we can add some
automatic dependency detection afterwards. Examples of dependencies:
login_history depends on user_accounts, default_roles and
roles_features; sell_history depends on products and price_lists.
- Fixtures sets. You could name a set of fixtures and load all of them
(at its dependencies) at once. For instance, you could load
login_framework, or history_tracking, or accountability.
Do you think this would help, any interest on it. Am I missing
something and there is already a way to get this (or similar)