aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorEloy Duran <eloy.de.enige@gmail.com>2009-12-30 22:10:18 +0100
committerEloy Duran <eloy.de.enige@gmail.com>2010-01-07 13:19:48 +0100
commit1afa9fa5a973734852bd7a9d20a534355c221098 (patch)
tree3bfa46195fbe57a8ead6b67bb7acb8d3b3b0bd4f /activerecord/test
parenta323b83acfe6e02812ec3b7b4ce912b07c85220e (diff)
downloadrails-1afa9fa5a973734852bd7a9d20a534355c221098.tar.gz
rails-1afa9fa5a973734852bd7a9d20a534355c221098.tar.bz2
rails-1afa9fa5a973734852bd7a9d20a534355c221098.zip
Refactored nested attributes a bit around :reject_if => :all_blank.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/nested_attributes_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb
index 8891282915..1d9b734b02 100644
--- a/activerecord/test/cases/nested_attributes_test.rb
+++ b/activerecord/test/cases/nested_attributes_test.rb
@@ -34,7 +34,10 @@ class TestNestedAttributesInGeneral < ActiveRecord::TestCase
end
def test_should_add_a_proc_to_nested_attributes_options
- [:parrots, :birds, :birds_with_reject_all_blank].each do |name|
+ assert_equal ActiveRecord::NestedAttributes::ClassMethods::REJECT_ALL_BLANK_PROC,
+ Pirate.nested_attributes_options[:birds_with_reject_all_blank][:reject_if]
+
+ [:parrots, :birds].each do |name|
assert_instance_of Proc, Pirate.nested_attributes_options[name][:reject_if]
end
end