aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/base_test.rb')
-rwxr-xr-xactiverecord/test/base_test.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index 4afeb52a87..27bfdfb72f 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1219,15 +1219,17 @@ class BasicsTest < Test::Unit::TestCase
assert_equal res4, res5
- res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
- res7 = nil
- assert_nothing_raised do
- res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
- :joins => "p, comments co",
- :select => "p.id",
- :distinct => true)
+ unless current_adapter?(:SQLite2Adapter, :DeprecatedSQLiteAdapter)
+ res6 = Post.count_by_sql "SELECT COUNT(DISTINCT p.id) FROM posts p, comments co WHERE p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id"
+ res7 = nil
+ assert_nothing_raised do
+ res7 = Post.count(:conditions => "p.#{QUOTED_TYPE} = 'Post' AND p.id=co.post_id",
+ :joins => "p, comments co",
+ :select => "p.id",
+ :distinct => true)
+ end
+ assert_equal res6, res7
end
- assert_equal res6, res7
end
def test_clear_association_cache_stored