diff options
author | lest <just.lest@gmail.com> | 2011-11-27 16:59:44 +0300 |
---|---|---|
committer | lest <just.lest@gmail.com> | 2011-11-27 16:59:44 +0300 |
commit | bc81ba2451a6a6c5507ad497cf838935e9d1ece2 (patch) | |
tree | fab94e9158920a0ae33c23b0f8072800d298189b /actionpack/test/template | |
parent | 3c81fc3b91ddfd4d115a7001640588eb93249261 (diff) | |
download | rails-bc81ba2451a6a6c5507ad497cf838935e9d1ece2.tar.gz rails-bc81ba2451a6a6c5507ad497cf838935e9d1ece2.tar.bz2 rails-bc81ba2451a6a6c5507ad497cf838935e9d1ece2.zip |
fix label with block in erb
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index ccedcd7dac..0758106a40 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -230,6 +230,13 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal('<label for="post_title">The title, please:</label>', label(:post, :title) { "The title, please:" }) end + def test_label_with_block_in_erb + path = ActionView::FileSystemResolver.new(FIXTURE_LOAD_PATH) + view_paths = ActionView::PathSet.new([path]) + view = ActionView::Base.new(view_paths) + assert_equal "<label for=\"post_message\">\n Message\n <input id=\"post_message\" name=\"post[message]\" size=\"30\" type=\"text\" />\n</label>", view.render("test/label_with_block") + end + def test_text_field assert_dom_equal( '<input id="post_title" name="post[title]" size="30" type="text" value="Hello World" />', text_field("post", "title") |