diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-01-07 02:17:18 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-01-07 02:17:18 +0300 |
commit | f1b05deba76aee3437dd45577e0257e45ae157e5 (patch) | |
tree | 5fdd7dc362387a73e15949ee5bec7e871d1dc205 /actionpack/test/template | |
parent | 056b8386d06de5b6a864562f3f0b88ba4b4424a8 (diff) | |
download | rails-f1b05deba76aee3437dd45577e0257e45ae157e5.tar.gz rails-f1b05deba76aee3437dd45577e0257e45ae157e5.tar.bz2 rails-f1b05deba76aee3437dd45577e0257e45ae157e5.zip |
use stub instead of redefining method to suppress warnings
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |