aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-11-11 19:49:22 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-11-11 19:53:54 +0900
commit3ce9e43bc343283ac738efb5b9b11672cb6a78b3 (patch)
tree0de67676d336535c4e9caaec2086e5ec4b9b8e52 /activerecord/test
parent48b10134a55724958d464a0bca3f1857a8b4a814 (diff)
downloadrails-3ce9e43bc343283ac738efb5b9b11672cb6a78b3.tar.gz
rails-3ce9e43bc343283ac738efb5b9b11672cb6a78b3.tar.bz2
rails-3ce9e43bc343283ac738efb5b9b11672cb6a78b3.zip
Avoid sorting an Array including objects from different Classes
addresses "ArgumentError: comparison of VerySpecialComment with SpecialComment failed" in ActiveRecord::DelegationRelationTest#test_#sort!_delegation_is_deprecated
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relation/delegation_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/delegation_test.rb b/activerecord/test/cases/relation/delegation_test.rb
index 1b60c97b51..7f99b6841f 100644
--- a/activerecord/test/cases/relation/delegation_test.rb
+++ b/activerecord/test/cases/relation/delegation_test.rb
@@ -64,7 +64,7 @@ module ActiveRecord
fixtures :comments
def target
- Comment.where.not(body: nil)
+ Comment.where(body: 'Normal type')
end
[:map, :collect].each do |method|