From ce8e4a43b353b7e36a1c9f98561dc7ed23e16c93 Mon Sep 17 00:00:00 2001 From: Alex Robbin Date: Tue, 12 Aug 2014 23:43:24 -0400 Subject: provide a builder for form labels to customize wrapping around I18n content --- actionview/test/template/form_helper_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionview/test') diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index d944214961..4cb2abbd85 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -319,6 +319,15 @@ class FormHelperTest < ActionView::TestCase ) end + def test_label_with_block_and_builder + with_locale :label do + assert_dom_equal( + '', + label(:post, :body) { |b| "#{b.translation}".html_safe } + ) + end + end + def test_label_with_block_in_erb assert_equal( %{}, -- cgit v1.2.3