Testing pipeline for plugins


#1

Hello Railers!

I have a question regarding plugin testing. I currently have a number
of plugins, most of which mix themselves either into AR (via meta-
methods or direct extensions of the Base) or into AP (via pre- and
postfilters). Howe am I supposed to test the former?
Testing a controller is straightforward - I just create a bogus
controller in my test suite. But how do I verify my AR mixins work
well? To test them, I need to create a dedicated class that acts
like an AR or a testing database - and for this I would need to init
an additional DB.

Do we have any solutions at the moment?


#2

On 12/2/05, Julian ‘Julik’ Tarkhanov removed_email_address@domain.invalid wrote:

an additional DB.

Do we have any solutions at the moment?

I just yanked the code from the ActiveRecord tests basically. Since
my table needs are very simple, I can get away with using a schema and
supporting all migration-ready db’s automatically.

http://techno-weenie.net/svn/projects/plugins/calculations/test/


rick
http://techno-weenie.net


#3

On 2-dec-2005, at 17:43, Rick O. wrote:

like an AR or a testing database - and for this I would need to init
an additional DB.

Do we have any solutions at the moment?

I just yanked the code from the ActiveRecord tests basically. Since
my table needs are very simple, I can get away with using a schema and
supporting all migration-ready db’s automatically.

http://techno-weenie.net/svn/projects/plugins/calculations/test/

Ok, looks good. I’ll be stealing this.