提交 079d684a 编写于 作者: J Jeremy Kemper

Fix failing test fallback when neither SQLite 2 or 3 is available.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5524 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 6c271a98
......@@ -57,7 +57,7 @@ def setup_connection
ActiveRecord::Base.configurations = { 'sqlite3_ar_integration' => connection_options }
ActiveRecord::Base.connection
rescue Exception # errors from establishing a connection
$stderr.puts 'SQLite 3 unavailable; falling to SQLite 2.'
$stderr.puts 'SQLite 3 unavailable; trying SQLite 2.'
connection_options = {:adapter => 'sqlite', :dbfile => ':memory:'}
ActiveRecord::Base.establish_connection(connection_options)
ActiveRecord::Base.configurations = { 'sqlite2_ar_integration' => connection_options }
......@@ -95,8 +95,8 @@ def self.fixtures(*args)
super if ActiveRecordTestConnector.connected
end
def setup
abort_tests unless ActiveRecordTestConnector.connected
def run(*args)
super if ActiveRecordTestConnector.connected
end
# Default so Test::Unit::TestCase doesn't complain
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册