diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-17 19:46:32 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-17 19:46:32 -0300 |
commit | 4b339f44bdaa307004db2345ac9c950d9f508814 (patch) | |
tree | 855748bc8f1df1a8b1d327810be229af05ee522e /activemodel/test | |
parent | c01c8967a02537f132d437d5ae15332982119651 (diff) | |
parent | 25e5b0c4a8d0045715a6ad11e2898585826e4e9b (diff) | |
download | rails-4b339f44bdaa307004db2345ac9c950d9f508814.tar.gz rails-4b339f44bdaa307004db2345ac9c950d9f508814.tar.bz2 rails-4b339f44bdaa307004db2345ac9c950d9f508814.zip |
Merge commit 'rails/master'
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/tests_database.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/activemodel/test/cases/tests_database.rb b/activemodel/test/cases/tests_database.rb index 0f4475fa2d..8dd00ea147 100644 --- a/activemodel/test/cases/tests_database.rb +++ b/activemodel/test/cases/tests_database.rb @@ -27,15 +27,10 @@ module ActiveModel def self.setup_connection defaults = { :database => ':memory:' } - begin - adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' - options = defaults.merge :adapter => adapter, :timeout => 500 - ActiveRecord::Base.establish_connection(options) - rescue Exception - $stderr.puts 'SQLite 3 unavailable; trying SQLite 2.' - options = defaults.merge :adapter => 'sqlite' - ActiveRecord::Base.establish_connection(options) - end + + adapter = defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3' + options = defaults.merge :adapter => adapter, :timeout => 500 + ActiveRecord::Base.establish_connection(options) end end end |