1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix test error when running with postgresql.

This Sqlite3 should be in if block.
Was giving error because sqlite3 is not loaded
This commit is contained in:
Arun Agrawal 2011-09-18 23:20:09 +05:30
parent 51bef9d8fb
commit d589d9f160

View file

@ -147,8 +147,10 @@ class QueryCacheTest < ActiveRecord::TestCase
end
def test_cache_does_not_wrap_string_results_in_arrays
require 'sqlite3/version' if current_adapter?(:SQLite3Adapter)
sqlite3_version = RUBY_PLATFORM =~ /java/ ? Jdbc::SQLite3::VERSION : SQLite3::VERSION
if current_adapter?(:SQLite3Adapter)
require 'sqlite3/version'
sqlite3_version = RUBY_PLATFORM =~ /java/ ? Jdbc::SQLite3::VERSION : SQLite3::VERSION
end
Task.cache do
# Oracle adapter returns count() as Fixnum or Float