summaryrefslogtreecommitdiffstats
path: root/activerecord-3.0.3-sqlite3-compat.patch
blob: 0410820b750800cd94fada58a103b31de18de187 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- test/cases/query_cache_test.rb.orig	2011-01-18 00:43:16.443404999 -0500
+++ test/cases/query_cache_test.rb	2011-01-18 00:51:08.929405005 -0500
@@ -57,7 +57,7 @@ class QueryCacheTest < ActiveRecord::Tes
       # Oracle adapter returns count() as Fixnum or Float
       if current_adapter?(:OracleAdapter)
         assert_kind_of Numeric, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
-      elsif current_adapter?(:SQLite3Adapter) && SQLite3::Version::VERSION > '1.2.5' or current_adapter?(:Mysql2Adapter)
+      elsif current_adapter?(:SQLite3Adapter) && defined?(SQLite3::Version::VERSION) && SQLite3::Version::VERSION > '1.2.5' or current_adapter?(:Mysql2Adapter)
         # Future versions of the sqlite3 adapter will return numeric
         assert_instance_of Fixnum,
          Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")