Hi, I''m working on a patch for the official auto_complete plugin. I noticed that a lot of the new plugins (e.g. acts_as_tree) are set up to be testable outside of a rails project. Is this now considered best practice? If so I''ll make that change while I''m working on the plugin. Thanks, Krishna --~--~---------~--~----~------------~-------~--~----~ 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 Oct 23, 11:49 pm, "Krishna Dole" <dontf...@gmail.com> wrote:> Is this now considered best practice?Yes. However, there is no real official way to do it. At some point there may be an official plugin_test_helper you''ll be able to require. Maybe I''ll look into this kind of thing this week. --~--~---------~--~----~------------~-------~--~----~ 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 10/23/07, Krishna Dole <dontfall@gmail.com> wrote:> > Hi, > > I''m working on a patch for the official auto_complete plugin. I > noticed that a lot of the new plugins (e.g. acts_as_tree) are set up > to be testable outside of a rails project. Is this now considered best > practice? If so I''ll make that change while I''m working on the plugin.I think it''s preferable if you can assume that the rails gem is available. Some kind of plugin test helper would indeed be pretty nice though. Have it check for vendor/rails or a specific GEM version (or not, if it''s an edge-only plugin). -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ 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 the quick response, Josh and Rick. Krishna On 10/23/07, Rick Olson <technoweenie@gmail.com> wrote:> > On 10/23/07, Krishna Dole <dontfall@gmail.com> wrote: > > > > Hi, > > > > I''m working on a patch for the official auto_complete plugin. I > > noticed that a lot of the new plugins (e.g. acts_as_tree) are set up > > to be testable outside of a rails project. Is this now considered best > > practice? If so I''ll make that change while I''m working on the plugin. > > I think it''s preferable if you can assume that the rails gem is > available. Some kind of plugin test helper would indeed be pretty > nice though. Have it check for vendor/rails or a specific GEM version > (or not, if it''s an edge-only plugin). > > > -- > Rick Olson > http://lighthouseapp.com > http://weblog.techno-weenie.net > http://mephistoblog.com > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
We released a plugin/gem that provides support for this type of thing: http://wiki.pluginaweek.org/Plugin_test_helper We use it in many of our own plugins. On Oct 24, 12:59 am, Josh Peek <joshp...@gmail.com> wrote:> On Oct 23, 11:49 pm, "Krishna Dole" <dontf...@gmail.com> wrote: > > > Is this now considered best practice? > > Yes. However, there is no real official way to do it. > > At some point there may be an official plugin_test_helper you''ll be > able to require. Maybe I''ll look into this kind of thing this week.--~--~---------~--~----~------------~-------~--~----~ 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 should mention here are a few examples of its usage (besides the README): http://svn.practical.cc/plugins/acts_as_tokenized http://svn.pluginaweek.org/trunk/plugins/active_record/attributes/encrypted_attributes On Oct 24, 12:59 pm, Aaron Pfeifer <aaron.pfei...@gmail.com> wrote:> We released a plugin/gem that provides support for this type of thing: > > http://wiki.pluginaweek.org/Plugin_test_helper > > We use it in many of our own plugins. > > On Oct 24, 12:59 am, Josh Peek <joshp...@gmail.com> wrote: > > > On Oct 23, 11:49 pm, "Krishna Dole" <dontf...@gmail.com> wrote: > > > > Is this now considered best practice? > > > Yes. However, there is no real official way to do it. > > > At some point there may be an official plugin_test_helper you''ll be > > able to require. Maybe I''ll look into this kind of thing this week.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---