From f1b05deba76aee3437dd45577e0257e45ae157e5 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Sat, 7 Jan 2012 02:17:18 +0300 Subject: use stub instead of redefining method to suppress warnings --- actionpack/test/template/form_helper_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index ad0cc41d69..82e001732d 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -875,7 +875,7 @@ class FormHelperTest < ActionView::TestCase def test_form_for_with_remote_without_html @post.persisted = false - def @post.to_key; nil; end + @post.stubs(:to_key).returns(nil) form_for(@post, :remote => true) do |f| concat f.text_field(:title) concat f.text_area(:body) @@ -1025,7 +1025,7 @@ class FormHelperTest < ActionView::TestCase old_locale, I18n.locale = I18n.locale, :submit @post.persisted = false - def @post.to_key; nil; end + @post.stubs(:to_key).returns(nil) form_for(@post) do |f| concat f.submit end -- cgit v1.2.3