Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use stub instead of redefining method to suppress warnings

  • Loading branch information...
commit f1b05deba76aee3437dd45577e0257e45ae157e5 1 parent 056b838
@lest lest authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/template/form_helper_test.rb
View
4 actionpack/test/template/form_helper_test.rb
@@ -875,7 +875,7 @@ def test_form_for_with_remote_in_html
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 @@ def test_submit_with_object_as_new_record_and_locale_strings
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
Please sign in to comment.
Something went wrong with that request. Please try again.