diff options
author | José Valim <jose.valim@gmail.com> | 2012-03-18 04:10:15 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-03-18 04:10:15 -0700 |
commit | 0c18fafcdf5dea1681a67bf0e008c5368c579d8a (patch) | |
tree | 19e1b66bb872556c7267a6101cfe1de7f3d70722 /actionpack/test/template/date_helper_test.rb | |
parent | 2b5cb1cd41ea765ae665321236c83c9d0128636b (diff) | |
parent | 05406442b81be49154737d763fc65c7fb0f03608 (diff) | |
download | rails-0c18fafcdf5dea1681a67bf0e008c5368c579d8a.tar.gz rails-0c18fafcdf5dea1681a67bf0e008c5368c579d8a.tar.bz2 rails-0c18fafcdf5dea1681a67bf0e008c5368c579d8a.zip |
Merge pull request #5496 from atd/master
time_tag support for blocks
Diffstat (limited to 'actionpack/test/template/date_helper_test.rb')
-rw-r--r-- | actionpack/test/template/date_helper_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index 9e2f4ec347..1d934b153f 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -2865,6 +2865,10 @@ class DateHelperTest < ActionView::TestCase assert_match(/<time.*>Right now<\/time>/, time_tag(Time.now, 'Right now')) end + def test_time_tag_with_given_block + assert_match(/<time.*><span>Right now<\/span><\/time>/, time_tag(Time.now){ '<span>Right now</span>'.html_safe }) + end + def test_time_tag_with_different_format time = Time.now expected = "<time datetime=\"#{time.xmlschema}\">#{I18n.l(time, :format => :short)}</time>" |