Various proposals have been floating around http://dev.rubyonrails.org/ticket/6424 to allow users to specify references to other fixtures in their fixture files, so that foreign key references are kept consistent in test fixtures. One of the suggestions was to bring the fixture references plugin (http://wiki.pluginaweek.org/Fixture_references) into core. I know that, as a plugin, it''s not hard to include it in your Rails application, but it''s a rare Rails app indeed that doesn''t have some measure of foreign key in it, and keeping fixtures as flexible and un-brittle as possible seems like a big win for testing. What do other people think about bringing this plugin in? If it''s considered a possibility, I''ll open up a ticket with a patch and whatnot, I just don''t want to add yet more noise to Trac if it''s generally considered a bad idea. - Matt -- A byte walks into a bar and orders a pint. Bartender asks him "What''s wrong?" The byte says "Parity error." Bartender nods and says "Yeah, I thought you looked a bit off." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yeah it seems like a better syntax, though I haven''t actually looked at their code so I can''t vouch for its core-iness. Feel free to kill my patch[1] and reopen one regarding fixture references. [1] I''m happy that people are inspired to write better versions of my half-baked plugins :D ------- Courtenay On Jul 22, 2007, at 6:35 PM, Matthew Palmer <mpalmer@hezmatt.org> wrote:> > Various proposals have been floating around > http://dev.rubyonrails.org/ticket/6424 to allow users to specify > references > to other fixtures in their fixture files, so that foreign key > references are > kept consistent in test fixtures. > > One of the suggestions was to bring the fixture references plugin > (http://wiki.pluginaweek.org/Fixture_references) into core. I know > that, as > a plugin, it''s not hard to include it in your Rails application, but > it''s a > rare Rails app indeed that doesn''t have some measure of foreign key > in it, > and keeping fixtures as flexible and un-brittle as possible seems > like a big > win for testing. > > What do other people think about bringing this plugin in? If it''s > considered a possibility, I''ll open up a ticket with a patch and > whatnot, I > just don''t want to add yet more noise to Trac if it''s generally > considered a > bad idea. > > - Matt > > -- > A byte walks into a bar and orders a pint. Bartender asks him "What''s > wrong?" The byte says "Parity error." Bartender nods and says "Yeah, I > thought you looked a bit off." > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m myself a bit undecided on whether this is something that should be in core. On the one hand, I find it really helps in quickly looking over a fixture and seeing what else it references. It also helps me to forget about ids and focus on relationships. On the other hand, I don''t know how many people actually care about the brittleness of their fixtures. I''d be more than happy to assist in making any suggested changes to the plugin/documentation if others feel this is worth submitting a patch for. -Aaron On Jul 22, 9:35 pm, Matthew Palmer <mpal...@hezmatt.org> wrote:> Various proposals have been floating aroundhttp://dev.rubyonrails.org/ticket/6424to allow users to specify references > to other fixtures in their fixture files, so that foreign key references are > kept consistent in test fixtures. > > One of the suggestions was to bring the fixture references plugin > (http://wiki.pluginaweek.org/Fixture_references) into core. I know that, as > a plugin, it''s not hard to include it in your Rails application, but it''s a > rare Rails app indeed that doesn''t have some measure of foreign key in it, > and keeping fixtures as flexible and un-brittle as possible seems like a big > win for testing. > > What do other people think about bringing this plugin in? If it''s > considered a possibility, I''ll open up a ticket with a patch and whatnot, I > just don''t want to add yet more noise to Trac if it''s generally considered a > bad idea. > > - Matt > > -- > A byte walks into a bar and orders a pint. Bartender asks him "What''s > wrong?" The byte says "Parity error." Bartender nods and says "Yeah, I > thought you looked a bit off."--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maybe there''s a need for a super-fixtures plugin combining the features of all the disparate fixture plugins. First, can you combine fixture references with this patch? http://dev.rubyonrails.org/ticket/1911 It allows code like fixture :topics_set_two, :table_name => "topics", :file_name => "topics2" Are there any more useful edge-case fixtures patches? On 7/22/07, Aaron Pfeifer <aaron.pfeifer@gmail.com> wrote:> > I''m myself a bit undecided on whether this is something that should be > in core. On the one hand, I find it really helps in quickly looking > over a fixture and seeing what else it references. It also helps me > to forget about ids and focus on relationships. On the other hand, I > don''t know how many people actually care about the brittleness of > their fixtures. > > I''d be more than happy to assist in making any suggested changes to > the plugin/documentation if others feel this is worth submitting a > patch for. > > -Aaron > > On Jul 22, 9:35 pm, Matthew Palmer <mpal...@hezmatt.org> wrote: > > Various proposals have been floating aroundhttp://dev.rubyonrails.org/ticket/6424to allow users to specify references > > to other fixtures in their fixture files, so that foreign key references are > > kept consistent in test fixtures. > > > > One of the suggestions was to bring the fixture references plugin > > (http://wiki.pluginaweek.org/Fixture_references) into core. I know that, as > > a plugin, it''s not hard to include it in your Rails application, but it''s a > > rare Rails app indeed that doesn''t have some measure of foreign key in it, > > and keeping fixtures as flexible and un-brittle as possible seems like a big > > win for testing. > > > > What do other people think about bringing this plugin in? If it''s > > considered a possibility, I''ll open up a ticket with a patch and whatnot, I > > just don''t want to add yet more noise to Trac if it''s generally considered a > > bad idea. > > > > - Matt > > > > -- > > A byte walks into a bar and orders a pint. Bartender asks him "What''s > > wrong?" The byte says "Parity error." Bartender nods and says "Yeah, I > > thought you looked a bit off." > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hmm, my initial feeling is that they should be separate since they tackle separate problems, even though they''re both related to fixtures. I''m guessing core would rather see small, incremental updates rather than 1 mega-patch...? On Jul 23, 12:01 pm, Courtenay <court3...@gmail.com> wrote:> Maybe there''s a need for a super-fixtures plugin combining the > features of all the disparate fixture plugins. > > First, can you combine fixture references with this patch? > > http://dev.rubyonrails.org/ticket/1911 > > It allows code like > > fixture :topics_set_two, :table_name => "topics", :file_name => "topics2" > > Are there any more useful edge-case fixtures patches? > > On 7/22/07, Aaron Pfeifer <aaron.pfei...@gmail.com> wrote: > > > > > I''m myself a bit undecided on whether this is something that should be > > in core. On the one hand, I find it really helps in quickly looking > > over a fixture and seeing what else it references. It also helps me > > to forget about ids and focus on relationships. On the other hand, I > > don''t know how many people actually care about the brittleness of > > their fixtures. > > > I''d be more than happy to assist in making any suggested changes to > > the plugin/documentation if others feel this is worth submitting a > > patch for. > > > -Aaron > > > On Jul 22, 9:35 pm, Matthew Palmer <mpal...@hezmatt.org> wrote: > > > Various proposals have been floating aroundhttp://dev.rubyonrails.org/ticket/6424toallow users to specify references > > > to other fixtures in their fixture files, so that foreign key references are > > > kept consistent in test fixtures. > > > > One of the suggestions was to bring the fixture references plugin > > > (http://wiki.pluginaweek.org/Fixture_references) into core. I know that, as > > > a plugin, it''s not hard to include it in your Rails application, but it''s a > > > rare Rails app indeed that doesn''t have some measure of foreign key in it, > > > and keeping fixtures as flexible and un-brittle as possible seems like a big > > > win for testing. > > > > What do other people think about bringing this plugin in? If it''s > > > considered a possibility, I''ll open up a ticket with a patch and whatnot, I > > > just don''t want to add yet more noise to Trac if it''s generally considered a > > > bad idea. > > > > - Matt > > > > -- > > > A byte walks into a bar and orders a pint. Bartender asks him "What''s > > > wrong?" The byte says "Parity error." Bartender nods and says "Yeah, I > > > thought you looked a bit off."--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---