aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xactiverecord/test/base_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index f3b4e09cf7..d35f876002 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1094,8 +1094,10 @@ class BasicsTest < Test::Unit::TestCase
end
assert_equal res4, res5
-
- res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments c WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=c.post_id"
+
+ unless ActiveRecord::Base.connection.raw_connection.class.name == 'SQLite::Database'
+ res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments c WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=c.post_id"
+ end
res7 = nil
assert_nothing_raised do
res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=c.post_id",