Table of Contents
Lafcadio's philosophy about testing is to try to mock out as much as possible, so that extensive database-dependent tests can be run through memory quickly. The primary engine behind that is the
MockObjectStore, which pretends to be the
ObjectStore representing the database.
mock_object_store = MockObjectStore.new ObjectStore.set_object_store mock_object_store
Adding the above two lines to your test class'
setup method will make every database-dependent call going through Lafcadio go through the virtual database.