I have come to a seeming realization that rails will only load fixtures from one directory per each functional test file (this seems a little un-DRY to me). Am I wrong in my assumption; can it be done? Or is this intentional and I simply don''t understand how things are supposed to work? I''m a Rails noob, but I am willing to dive into the Rails source if it is just a matter of putting some hours into it. /Brad. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you have some namespaced models, then the associated namespaced fixtures will be in their own directory by default. On 4/7/08, bhus <bhuskins@christian-horizons.org> wrote:> > I have come to a seeming realization that rails will only load > fixtures > from one directory per each functional test file (this seems a little > un-DRY to > me). Am I wrong in my assumption; can it be done? Or is this > intentional and I simply don''t understand how things are supposed to > work? > > I''m a Rails noob, but I am willing to dive into the Rails source if it > is just a matter of putting > some hours into it. > > /Brad. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for your response Andrew. I should have been more specific in my question : my reason for wanting this is so I can have a few different fixture files for the SAME model : it seems I can''t have fixtures for the same model in the same directory. [ I have a few "count" methods that I want to make sure are working correctly in different circumstances (eg. depending on what type of user is making the call) ] --~--~---------~--~----~------------~-------~--~----~ 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 probably want fixture scenarios. http://errtheblog.com/posts/61-fixin-fixtures On Mon, Apr 7, 2008 at 6:22 PM, bhus <bhuskins@christian-horizons.org> wrote:> > Thanks for your response Andrew. > > I should have been more specific in my question : my reason for > wanting this is so I can have a few different fixture files for the > SAME model : it seems I can''t have fixtures for the same model in the > same directory. > > [ I have a few "count" methods that I want to make sure are working > correctly in different circumstances (eg. depending on what type of > user is making the call) ] > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for taking the time to reply, Mislav. Just looked at scenarios. This looks promising, but there doesn''t seem to be any way to share fixtures between multiple tests. I have a set of lookup tables that won''t change between tests, whereas i have another table that I would like to change from test to test. I may not be understanding scenarios properly, though, so I will have a closer look tomorrow. /Brad. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---