aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-28 00:57:21 -0700
committerJon Leighton <j@jonathanleighton.com>2011-09-28 00:57:21 -0700
commitddfa00c26614df420b80352491fd8f71f868a187 (patch)
tree501f1e40b905e761c189241ed9286146ad172463
parent771b76a3dc75075b3cb777da96c11aa73425dbf6 (diff)
parentaefc40324df3c98a278f05eee4980845fbeedbef (diff)
downloadrails-ddfa00c26614df420b80352491fd8f71f868a187.tar.gz
rails-ddfa00c26614df420b80352491fd8f71f868a187.tar.bz2
rails-ddfa00c26614df420b80352491fd8f71f868a187.zip
Merge pull request #3152 from rocky-jaiswal/fix-failed-ar-test
Fixed failed test under 1.8.7 as map.keys order in indeterminable
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb2
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
index d1d02c25d5..34d90cc395 100644
--- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
@@ -651,7 +651,7 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
end
def test_habtm_selects_all_columns_by_default
- assert_equal Project.column_names, developers(:david).projects.first.attributes.keys
+ assert_equal Project.column_names.sort, developers(:david).projects.first.attributes.keys.sort
end
def test_habtm_respects_select_query_method
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index fdfbcbefac..cddd2a6f8c 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -486,7 +486,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
end
def test_default_select
- assert_equal Comment.column_names, posts(:welcome).comments.first.attributes.keys
+ assert_equal Comment.column_names.sort, posts(:welcome).comments.first.attributes.keys.sort
end
def test_select_query_method