aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-14 11:23:49 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-14 11:23:49 -0400
commit9ec54d950004f102c8ca040608611e3ca668b284 (patch)
tree55d0bf2fb2b56dc30fbda6302e5a3d069ea149f3 /actionpack/test/controller
parentdb8897c2de254f542a108144951bcc6a142236f7 (diff)
parent2b8acdcd21e61a69eefb5c3ef132995c287c0a8e (diff)
downloadrails-9ec54d950004f102c8ca040608611e3ca668b284.tar.gz
rails-9ec54d950004f102c8ca040608611e3ca668b284.tar.bz2
rails-9ec54d950004f102c8ca040608611e3ca668b284.zip
Merge pull request #19736 from kmcphillips/master
Set default form builder for a controller
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/form_builder_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/test/controller/form_builder_test.rb b/actionpack/test/controller/form_builder_test.rb
new file mode 100644
index 0000000000..99eeaf9ab6
--- /dev/null
+++ b/actionpack/test/controller/form_builder_test.rb
@@ -0,0 +1,17 @@
+require 'abstract_unit'
+
+class FormBuilderController < ActionController::Base
+ class SpecializedFormBuilder < ActionView::Helpers::FormBuilder ; end
+
+ default_form_builder SpecializedFormBuilder
+end
+
+class ControllerFormBuilderTest < ActiveSupport::TestCase
+ setup do
+ @controller = FormBuilderController.new
+ end
+
+ def test_default_form_builder_assigned
+ assert_equal FormBuilderController::SpecializedFormBuilder, @controller.default_form_builder
+ end
+end