Categorized: Database, Rails

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

Nothing to see here yet. Start things off, why don't you?

What do you think about that?

Elsewhere in the empire: Home, Blog, APOD