Add a test for directly passing the custom wrapper.

This commit is contained in:
José Valim 2011-09-04 12:02:27 +02:00
parent f6d4ef7928
commit b53cb5e21a
1 changed files with 6 additions and 0 deletions

View File

@ -95,10 +95,16 @@ class WrapperTest < ActionView::TestCase
with_form_for @user, :name
assert_no_select "section.custom_wrapper div.another_wrapper label"
assert_no_select "section.custom_wrapper div.another_wrapper input.string"
output_buffer.replace ""
with_form_for @user, :name, :wrapper => :another
assert_select "section.custom_wrapper div.another_wrapper label"
assert_select "section.custom_wrapper div.another_wrapper input.string"
output_buffer.replace ""
end
with_form_for @user, :name, :wrapper => custom_wrapper
assert_select "section.custom_wrapper div.another_wrapper label"
assert_select "section.custom_wrapper div.another_wrapper input.string"
end
end