This list is for the development of Rails itself, so you may have better luck 
with these sorts of questions on rails-talk. That said,

On Sep 22, 2010, at 11:31 AM, tmorgan99 wrote:
> How can I setup sqlite3 backed database in test environment with
> the :memory: driver.

# database.yml

development: &defaults
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

test:
  <<: *defaults
  database: ":memory:"

# test/test_helper.rb

if ":memory:" == ActiveRecord::Base.configurations[Rails.env]["database"]
  ActiveRecord::Migration.verbose = false
  load "db/schema.rb"
end

This is on Rails 2.


~ j.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to