aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r--actionpack/test/template/form_helper_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 4d90e8968d..bf65a9359b 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -1690,9 +1690,7 @@ class FormHelperTest < ActionView::TestCase
end
def test_nested_fields_for_with_hash_like_model
- @author = Author.new
- def @author.is_a?(klass); klass == Hash; end
- def @author.extractable_options?; false; end
+ @author = HashBackedAuthor.new
form_for(@post) do |f|
concat f.fields_for(:author, @author) { |af|
@@ -1701,7 +1699,7 @@ class FormHelperTest < ActionView::TestCase
end
expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'put') do
- '<input id="post_author_attributes_name" name="post[author_attributes][name]" size="30" type="text" value="new author" />'
+ '<input id="post_author_attributes_name" name="post[author_attributes][name]" size="30" type="text" value="hash backed author" />'
end
assert_dom_equal expected, output_buffer