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) functionality? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
You might take a look at Fixture Scenarios rather than reimplementing a lot of those features: http://code.google.com/p/fixture-scenarios/ On 7/2/07, Sebasti�n Galkin <paraseba@gmail.com> wrote:> > 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) > functionality? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 2, 7:08 pm, Courtenay <court3...@gmail.com> wrote:> You might take a look at Fixture Scenarios rather than reimplementing > a lot of those features: > > http://code.google.com/p/fixture-scenarios/ >Great, that seems to cover a part of it, thank you. And they are using a "Jorge Luis Borges" user in the example ... how could it be better? Don''t you think some of this functionality should come up to native Rails? Or is it OK in a plugin? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 7/2/07, Sebastián Galkin <paraseba@gmail.com> wrote:> > On Jul 2, 7:08 pm, Courtenay <court3...@gmail.com> wrote: > > You might take a look at Fixture Scenarios rather than reimplementing > > a lot of those features: > > > > http://code.google.com/p/fixture-scenarios/ > > > > Great, that seems to cover a part of it, thank you. > And they are using a "Jorge Luis Borges" user in the example ... how > could it be better? > > Don't you think some of this functionality should come up to native > Rails? Or is it OK in a plugin? >It's definitely plugin material. The fixtures thing is far from solved. Personally, I don't really use fixtures (mocks and stubs ftw) courtenay --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---