From 3853b73bf8535efcf55f573f4b269e1082c3d5cd Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 6 Jan 2012 13:25:48 -0200 Subject: Do not stub id here --- actionpack/test/template/form_helper_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index a36b1f713f..942be67d02 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -65,7 +65,7 @@ class FormHelperTest < ActionView::TestCase def full_messages() [ "Author name can't be empty" ] end }.new end - def @post.id; 123; end + def @post.to_key; [123]; end def @post.id_before_type_cast; 123; end def @post.to_param; '123'; end @@ -628,7 +628,7 @@ class FormHelperTest < ActionView::TestCase end def test_auto_index - pid = @post.id + pid = 123 assert_dom_equal( "", label("post[]", "title") @@ -654,7 +654,7 @@ class FormHelperTest < ActionView::TestCase end def test_auto_index_with_nil_id - pid = @post.id + pid = 123 assert_dom_equal( "", text_field("post[]","title", :id => nil) @@ -867,7 +867,7 @@ class FormHelperTest < ActionView::TestCase def test_form_for_with_remote_without_html @post.persisted = false - def @post.id; nil; end + def @post.to_key; nil; end form_for(@post, :remote => true) do |f| concat f.text_field(:title) concat f.text_area(:body) @@ -1017,7 +1017,7 @@ class FormHelperTest < ActionView::TestCase old_locale, I18n.locale = I18n.locale, :submit @post.persisted = false - def @post.id; nil; end + def @post.to_key; nil; end form_for(@post) do |f| concat f.submit end @@ -2089,7 +2089,7 @@ class FormHelperTest < ActionView::TestCase def test_form_for_with_new_object post = Post.new post.persisted = false - def post.id() nil end + def post.to_key; nil; end form_for(post) do |f| end -- cgit v1.2.3