diff options
author | Damien Mathieu <42@dmathieu.com> | 2011-06-26 09:41:30 +0200 |
---|---|---|
committer | Damien Mathieu <42@dmathieu.com> | 2011-06-26 09:41:30 +0200 |
commit | eb22c51173f3ebe0f5a53f8bc57ebc74e4f0a824 (patch) | |
tree | 9e5c8a5ba8e3f93996a5db43bb613e1c2eb588b7 /activerecord/test | |
parent | bc743dc1ce4657be0c377edaab69f8e9ca0e350b (diff) | |
download | rails-eb22c51173f3ebe0f5a53f8bc57ebc74e4f0a824.tar.gz rails-eb22c51173f3ebe0f5a53f8bc57ebc74e4f0a824.tar.bz2 rails-eb22c51173f3ebe0f5a53f8bc57ebc74e4f0a824.zip |
comparing different classes returns nil
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 873c6d9678..5fef3faab9 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -486,6 +486,12 @@ class BasicsTest < ActiveRecord::TestCase assert_equal [topic_2, topic_1].sort, [topic_1, topic_2] end + def test_comparison_with_different_objects + topic = Topic.create + category = Category.create(:name => "comparison") + assert_nil topic <=> category + end + def test_readonly_attributes assert_equal Set.new([ 'title' , 'comments_count' ]), ReadonlyTitlePost.readonly_attributes |