blob: 8e95ca6560fc48c043ba96ccd24000f59c064814 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From c1d8ceaf1c37924b7a037ba7f44fbe2dec0eb724 Mon Sep 17 00:00:00 2001
From: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
Date: Thu, 22 Mar 2012 23:47:22 -0300
Subject: [PATCH] Fix more failing tests related to ruby 1.8.7 p358 version change
(cherry-picked from commit f748d36b4014418c48553836a56b4bec74e15e49)
---
activerecord/test/cases/nested_attributes_test.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb
index 6b144a1..d4bb6f8 100644
--- a/activerecord/test/cases/nested_attributes_test.rb
+++ b/activerecord/test/cases/nested_attributes_test.rb
@@ -513,9 +513,13 @@ module NestedAttributesOnACollectionAssociationTests
end
def test_should_automatically_build_new_associated_models_for_each_entry_in_a_hash_where_the_id_is_missing
+ attributes = ActiveSupport::OrderedHash.new
+ attributes['foo'] = { :name => 'Grace OMalley' }
+ attributes['bar'] = { :name => 'Privateers Greed' }
+
@pirate.send(@association_name).destroy_all
@pirate.reload.attributes = {
- association_getter => { 'foo' => { :name => 'Grace OMalley' }, 'bar' => { :name => 'Privateers Greed' }}
+ association_getter => attributes
}
assert @pirate.send(@association_name).first.new_record?
--
1.7.1
|