aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-01-07 03:18:46 -0800
committerPiotr Sarnacki <drogus@gmail.com>2012-01-07 03:18:46 -0800
commitba168e8f067d72f7a21691f4cfdcd40432135246 (patch)
tree6ad15d174127db780294374c08803135b9600007 /actionpack/test/template
parentf082004fbcf5f360fb902974cfe27a5280b7765f (diff)
parentf1b05deba76aee3437dd45577e0257e45ae157e5 (diff)
downloadrails-ba168e8f067d72f7a21691f4cfdcd40432135246.tar.gz
rails-ba168e8f067d72f7a21691f4cfdcd40432135246.tar.bz2
rails-ba168e8f067d72f7a21691f4cfdcd40432135246.zip
Merge pull request #4369 from lest/remove-warnings
use stub instead of redefining method to suppress warnings
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/form_helper_test.rb4
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