Forum: Ruby on Rails Testing pipeline for plugins

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
listbox (Guest)
on 2005-12-02 17:15
(Received via mailing list)
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?
technoweenie (Guest)
on 2005-12-02 18:45
(Received via mailing list)
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/calc...


--
rick
http://techno-weenie.net
listbox (Guest)
on 2005-12-02 19:58
(Received via mailing list)
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/calc...

Ok, looks good. I'll be stealing this.
This topic is locked and can not be replied to.