we don't need extra iVar for hash backed author

This commit is contained in:
Vasiliy Ermolovich 2012-09-11 18:56:33 +03:00
parent cb64b80fdb
commit 7710c3b0e9
2 changed files with 2 additions and 6 deletions

View File

@ -545,10 +545,8 @@ class BuilderTest < ActionView::TestCase
end
test 'fields for with a hash like model yeilds an instance of FormBuilder' do
@hash_backed_author = HashBackedAuthor.new
with_concat_form_for(:user) do |f|
f.simple_fields_for(:author, @hash_backed_author) do |author|
f.simple_fields_for(:author, HashBackedAuthor.new) do |author|
assert author.instance_of?(SimpleForm::FormBuilder)
author.input :name
end

View File

@ -92,9 +92,7 @@ class FormHelperTest < ActionView::TestCase
end
test 'fields for with a hash like model yeilds an instance of FormBuilder' do
@hash_backed_author = HashBackedAuthor.new
with_concat_fields_for(:author, @hash_backed_author) do |f|
with_concat_fields_for(:author, HashBackedAuthor.new) do |f|
assert f.instance_of?(SimpleForm::FormBuilder)
f.input :name
end