Datamapper In Memory Database
Posted
by Daniel Ribeiro
on Stack Overflow
See other posts from Stack Overflow
or by Daniel Ribeiro
Published on 2010-05-13T21:40:21Z
Indexed on
2010/05/13
21:44 UTC
Read the original article
Hit count: 297
It is easy to setup Datamapper with a Sqlite3 in memory database with: DataMapper.setup :default, 'sqlite3::memory:'.
However, when testing, I'd like to destroy the whole in memory database after each test, instead of invoking automigrate! as a shortcut on dropping everything. Is it possible? Or is it enough to set the default repository to nil, and let the garbage collector dispose of it?
© Stack Overflow or respective owner