Forum: Ruby on Rails Alone in the wilderness? Testing plugins with a database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8222471351de475ccbc18f42350a04d8?d=identicon&s=25 Krishna Dole (Guest)
on 2007-03-22 00:37
(Received via mailing list)

I'm one of the developers of a plugin [1] that needs a database for
testing. I've been having a miserable time keeping the tests for this
plugin working between Rails versions.

There are a number of guides out there for writing plugins [2], but
few of them cover testing, and those that do stop short of tests
requiring a database.

I'm wondering if anyone can point me to accepted best practices for
testing plugins with a database, or at least working example code. The
setup that we have for our plugin (used to) work great: it would load
the schema and run the tests against three different database
adapters. But now all the callbacks for ActiveRecord objects are being
triggered twice, and the setup is broken in other ways I don't

I want to keep supporting and developing this plugin, but I'm feeling
rather stuck at the moment. The code itself works fine, and I've got
500+ assertions; I just need a push in the right direction with the
test setup.

Many thanks,

This topic is locked and can not be replied to.