From 829de9d98e59f9b083ed96a9031cd9841c83ae47 Mon Sep 17 00:00:00 2001 From: Tom Stuart Date: Sat, 12 Feb 2011 12:07:47 +0000 Subject: Add block support to button_tag helper As per the HTML 4.01 spec: Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but the BUTTON element type allows content. Since rich content is the main purpose of the ', button_tag { 'Content' }) + end + + def test_button_tag_with_block_and_options + output = button_tag(:name => 'temptation', :type => 'button') { content_tag(:strong, 'Do not press me') } + assert_dom_equal('', output) + end + def test_image_submit_tag_with_confirmation assert_dom_equal( %(), -- cgit v1.2.3