aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r--actionpack/test/template/form_helper_test.rb12
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)