[jifty-devel] Using Jifty::Config::postload to override config during testing

Sean E. Millichamp sean at enertronllc.com
Fri Jun 2 05:56:36 EDT 2006

On Thu, 2006-06-01 at 22:33 -0400, Jesse Vincent wrote:

> > Any pointers on how to override RecordBaseClass in a test would be
> > greatly appreciated.
> Have you ad a look at Jifty::Test?
> In sub setup, there's code that should show off what you need to do.

It turns out I had the right idea, but the setup sub in Jifty::Test was
overriding my override when I use'd Jifty::Test in my test.  I ended up
just setting JIFTY_CONFIG in BEGIN{}.

I just committed two tests that are identical other then that one uses a
RecordBaseClass of Jifty::DBI::Record (and does what I'd expect) and one
uses a RecordBaseClass of Jifty::DBI::Record::Cachable and differs in
behavior from the first test.  I would have expected that the cache
would have been invalidated on an update and that the updated record
would be returned on a new load but that does not seem to be the case.

Hopefully, this will be obvious to someone more familiar with
Jifty::DBI's caching.  If not I will try to find some time to look at it
in more detail sometime soon.


 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102

More information about the jifty-devel mailing list