File: sqlite.rb

package info (click to toggle)
ruby-gettext-activerecord 2.1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 624 kB
  • sloc: ruby: 2,895; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#create a connection
if /java/ =~ RUBY_PLATFORM
  adapter = "jdbcsqlite3"
else
  adapter = "sqlite3"
end
ActiveRecord::Base.configurations = {"test" => {
  :adapter => adapter,
  :database => ":memory:"
}.with_indifferent_access}

ActiveRecord::Base.logger = Logger.new('/dev/null')
ActiveRecord::Base.establish_connection(:test)