aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-25 03:30:21 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-25 03:30:21 +0000
commit91dff3004192c2b94c17078f36b7d9fc35c1cf27 (patch)
treebfbaa6f6827bed59acd573b0aefc03d08c391c17
parent3b1972a8969ec193233642643659c73fd781aec3 (diff)
downloadrails-91dff3004192c2b94c17078f36b7d9fc35c1cf27.tar.gz
rails-91dff3004192c2b94c17078f36b7d9fc35c1cf27.tar.bz2
rails-91dff3004192c2b94c17078f36b7d9fc35c1cf27.zip
SQLServer: fix eager association test. Closes #5901.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/test/associations_go_eager_test.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 649655b6a8..622499a91a 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* SQLServer: fix eager association test. #5901 [Tom Ward]
+
* Clashing type columns due to a sloppy join shouldn't wreck single-table inheritance. #5838 [Kevin Clark]
* Fixtures: correct escaping of \n and \r. #5859 [evgeny.zislis@gmail.com]
diff --git a/activerecord/test/associations_go_eager_test.rb b/activerecord/test/associations_go_eager_test.rb
index ddcd72d045..bcdd63ce34 100644
--- a/activerecord/test/associations_go_eager_test.rb
+++ b/activerecord/test/associations_go_eager_test.rb
@@ -358,6 +358,10 @@ class EagerAssociationTest < Test::Unit::TestCase
end
def test_count_with_include
- assert_equal 3, authors(:david).posts_with_comments.count(:conditions => "length(comments.body) > 15")
+ if current_adapter?(:SQLServerAdapter)
+ assert_equal 3, authors(:david).posts_with_comments.count(:conditions => "len(comments.body) > 15")
+ else
+ assert_equal 3, authors(:david).posts_with_comments.count(:conditions => "length(comments.body) > 15")
+ end
end
end