The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Testing without the database

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andrew Montgomery

Posts: 42
Nickname: darkliquid
Registered: Sep, 2006

Andrew Montgomery is a lead developer for UK-based web development company SonicIQ
Testing without the database Posted: Sep 17, 2007 4:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Andrew Montgomery.
Original Post: Testing without the database
Feed Title: Dark Liquid - Ruby
Feed URL: http://feeds.feedburner.com/DarkLiquid-Ruby
Feed Description: Ruby and Rails related ramblings by Andrew Montgomery
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Andrew Montgomery
Latest Posts From Dark Liquid - Ruby

Advertisement

We’ve been embracing the whole testing without the database for our unit tests, making use of unit_record. However, with a recent update I found a lot of my tests failing. I eventually narrowed it down to something to do with query caching. Well, apparently query caching only gets activated if there are ActiveRecord configurations, so, since we aren’t using the database anyway, it should be okay to clear the configuration for our unit tests - right?

Well, it was, and this is what I put in my unit_test_helper file:

# Clears active record configurations since we don't need them
# (and they cause query cache problems)
ActiveRecord::Base.configurations.clear

Read: Testing without the database

Topic: Decide que hará Firefox con los archivos PDF Previous Topic   Next Topic Topic: PLUG MASHUP

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use