2017-07-24 16:20:53 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-06 12:54:50 -04:00
|
|
|
require "abstract_unit"
|
2015-04-06 22:20:57 -04:00
|
|
|
|
|
|
|
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
|