# Testing pipeline for plugins

**URL:** <https://www.ruby-forum.com/t/testing-pipeline-for-plugins/49323>\
**Category:** Rails\
**Created:** [December 2, 2005, 4:15pm UTC](https://www.ruby-forum.com/t/testing-pipeline-for-plugins/49323 "2005-12-02T16:15:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![listbox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@listbox](https://www.ruby-forum.com/u/listbox)\
**Post date:** [December 2, 2005, 4:15pm UTC](https://www.ruby-forum.com/t/testing-pipeline-for-plugins/49323/1 "2005-12-02T16:15:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![listbox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@listbox](https://www.ruby-forum.com/u/listbox)\
**Post date:** [December 2, 2005, 5:45pm UTC](https://www.ruby-forum.com/t/testing-pipeline-for-plugins/49323/2 "2005-12-02T17:45:15Z")

</div>

On 12/2/05, Julian ‘Julik’ Tarkhanov [removed\_email\_address@domain.invalid](mailto: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/](http://techno-weenie.net/svn/projects/plugins/calculations/test/)

–  
rick  
[http://techno-weenie.net](http://techno-weenie.net)

---

<div class="post-metadata">

**Author:** ![listbox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@listbox](https://www.ruby-forum.com/u/listbox)\
**Post date:** [December 2, 2005, 6:58pm UTC](https://www.ruby-forum.com/t/testing-pipeline-for-plugins/49323/3 "2005-12-02T18:58:23Z")

</div>

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/](http://techno-weenie.net/svn/projects/plugins/calculations/test/)

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