diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-26 15:34:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-26 15:34:22 -0700 |
commit | de9c0ef8eff8bd9c92332b4b854772519b4ef7b9 (patch) | |
tree | 6a534e062c2dde6d238c4c6bf8ce2cd532190968 /actionpack/test | |
parent | 045197f40eb33250bd07357b160f150cfa7515d1 (diff) | |
parent | 7a0cf2f5294e8bcef547642435636b394340a3e4 (diff) | |
download | rails-de9c0ef8eff8bd9c92332b4b854772519b4ef7b9.tar.gz rails-de9c0ef8eff8bd9c92332b4b854772519b4ef7b9.tar.bz2 rails-de9c0ef8eff8bd9c92332b4b854772519b4ef7b9.zip |
Merge pull request #5561 from carlosantoniodasilva/form-builder-block-arg
Properly deprecate the block argument in AV FormBuilder
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index c5de736ffb..3b1af47770 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -2231,6 +2231,18 @@ class FormHelperTest < ActionView::TestCase assert_equal "fields", output end + def test_form_builder_block_argument_deprecation + builder_class = Class.new(ActionView::Helpers::FormBuilder) do + def initialize(object_name, object, template, options, block) + super + end + end + + assert_deprecated /Giving a block to FormBuilder is deprecated and has no effect anymore/ do + builder_class.new(:foo, nil, nil, {}, proc {}) + end + end + protected def hidden_fields(method = nil) |