Solutions Log

So I only have to figure things out once.

Using SQLite in Memory Mode for Rails Testing

Watching the latest PeepCode at about the 15:00 mark, he mentions using SQLite in memory mode for your testing database. Here’s what you put in your config/database.yml:

test:
  adapter: sqlite3
  database: ":memory:"
  verbosity: silent

Run these commands:

$ script/plugin install memory_test_fix (use `--force` if you have any problems)
$ rake db:migrate
$ rake

Then you’re ready to go.

Sources:

See also how to set up SQLite for Rails

Comments