a9dc45459a
A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
22 lines
605 B
Ruby
22 lines
605 B
Ruby
require "abstract_unit"
|
|
|
|
class ControllerHelperTest < ActionView::TestCase
|
|
tests ActionView::Helpers::ControllerHelper
|
|
|
|
class SpecializedFormBuilder < ActionView::Helpers::FormBuilder ; end
|
|
|
|
def test_assign_controller_sets_default_form_builder
|
|
@controller = OpenStruct.new(default_form_builder: SpecializedFormBuilder)
|
|
assign_controller(@controller)
|
|
|
|
assert_equal SpecializedFormBuilder, default_form_builder
|
|
end
|
|
|
|
def test_assign_controller_skips_default_form_builder
|
|
@controller = OpenStruct.new
|
|
assign_controller(@controller)
|
|
|
|
assert_nil default_form_builder
|
|
end
|
|
end
|