In the Hibernate world, you can often have unit tests that appear to pass but there are actually bugs that don't show up because you're dealing with cached data. For example, you may save a parent with its children thinking it's cascading the save. If you re-query for the parent after the save and test the size of the child collection, it looks ok. But in reality Hibernate didn't save the children but cached the parent so you're looking at the un-saved children. One way to get around this is to clear the session cache between the save and the query so you know the data is coming straight from the database.
Is this an issue with ActiveRecord? If I save a model and then query it in the same test, is it possible that I'm not actually getting the data from the database but rather from the query cache? I haven't seen any sample tests that try to deal with this so I'm wondering if there's something that makes it a non-issue?