diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 1010598f65..20c90ea832 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -268,7 +268,7 @@ class FormHelperTest < Test::Unit::TestCase assert_dom_equal expected, _erbout end - class LabellingBulider < ActionView::Helpers::FormBuilder + class LabelledFormBuilder < ActionView::Helpers::FormBuilder (field_helpers - %w(hidden_field)).each do |selector| src = <<-END_SRC def #{selector}(field, *args, &proc) @@ -282,7 +282,7 @@ class FormHelperTest < Test::Unit::TestCase def test_form_for_with_labelled_builder _erbout = '' - form_for(:post, @post, :builder => LabellingBulider) do |f| + form_for(:post, @post, :builder => LabelledFormBuilder) do |f| _erbout.concat f.text_field(:title) _erbout.concat f.text_area(:body) _erbout.concat f.check_box(:secret) @@ -304,7 +304,7 @@ class FormHelperTest < Test::Unit::TestCase self.extend ActionView::Helpers::PrototypeHelper _erbout = '' - remote_form_for(:post, @post, :builder => LabellingBulider) do |f| + remote_form_for(:post, @post, :builder => LabelledFormBuilder) do |f| _erbout.concat f.text_field(:title) _erbout.concat f.text_area(:body) _erbout.concat f.check_box(:secret) @@ -323,19 +323,19 @@ class FormHelperTest < Test::Unit::TestCase def test_fields_for_with_labelled_builder _erbout = '' - - fields_for(:post, @post, :builder => LabellingBulider) do |f| + + fields_for(:post, @post, :builder => LabelledFormBuilder) do |f| _erbout.concat f.text_field(:title) _erbout.concat f.text_area(:body) _erbout.concat f.check_box(:secret) end - + expected = "<label for='title'>Title:</label> <input name='post[title]' size='30' type='text' id='post_title' value='Hello World' /><br/>" + "<label for='body'>Body:</label> <textarea name='post[body]' id='post_body' rows='20' cols='40'>Back to the hill and over it again!</textarea><br/>" + "<label for='secret'>Secret:</label> <input name='post[secret]' checked='checked' type='checkbox' id='post_secret' value='1' />" + "<input name='post[secret]' type='hidden' value='0' /><br/>" - + assert_dom_equal expected, _erbout end |