[Ruby] testing advice

ben wiseley wiseleyb at gmail.com
Sun Feb 11 15:41:24 PST 2007


Geoffrey... this is great stuff!

Any tips on how to dynamically add/change things like "acts_as..." to a
class.  For the tests I wanted to be able to test various options and I'm
assuming there's a more elegant way to that than creating a new class for
each acts_as_tsearch variation but I'm not having much luck google'ing this
up.

-ben


On 2/9/07, Geoffrey Grosenbach <boss at topfunky.com> wrote:
>
> On Fri, Feb 09, 2007 at 09:14:54AM -0800, ben wiseley wrote:
> > Since it's a very database search specific plugin I was thinking the
> > best way to do this would be to create a separate testing rails app.  Is
> > this the wrong way to go about testing plugins?
>
> I wrote a plugin that generates files for testing database-powered plugins
> against a sqlite database. You can write unit tests and make fixtures just
> like you would with a normal Rails app (but it's done inside the plugin).
>
> http://topfunky.net/svn/plugins/plugin_test/
>
> For an example in use, see
>
> http://topfunky.net/svn/plugins/ar_fixtures/
> http://topfunky.net/svn/plugins/ar_fixtures/test/ar_fixtures_test.rb
>
> Geoffrey Grosenbach
> ........................
> Blog | http://nubyonrails.com
> Podcast | http://podcast.rubyonrails.com
> Screencast | http://peepcode.com
>
> _______________________________________________
> Ruby at zenspider.com - Seattle.rb non-commercial list
> http://www.zenspider.com/seattle.rb
> http://www.zenspider.com/mailman/listinfo/ruby
>


More information about the Ruby mailing list