aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-01-17 21:15:33 +0100
committerYves Senn <yves.senn@gmail.com>2015-01-17 21:15:33 +0100
commitd6909af30991b10f4a69083b6eb26ed6d97f4641 (patch)
tree09bf9a5a7e4c9c06d7e56451f02bef4078adab60
parent1303288ba814a4876fcb4590e5bbed051443b1d4 (diff)
parent08eafc9646aa05e1c3408a9d32a26deb7d2c8fa0 (diff)
downloadrails-d6909af30991b10f4a69083b6eb26ed6d97f4641.tar.gz
rails-d6909af30991b10f4a69083b6eb26ed6d97f4641.tar.bz2
rails-d6909af30991b10f4a69083b6eb26ed6d97f4641.zip
Merge pull request #18569 from yuki24/eliminate-warning-in-action-view-test
Eliminate a ruby warning in a test in Action View
-rw-r--r--actionview/test/template/form_helper_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index e4fd797924..dccf6a2090 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -910,7 +910,11 @@ class FormHelperTest < ActionView::TestCase
end
def test_inputs_dont_use_before_type_cast_when_value_did_not_come_from_user
- def @post.id_came_from_user?; false; end
+ class << @post
+ undef id_came_from_user?
+ def id_came_from_user?; false; end
+ end
+
assert_dom_equal(
%{<textarea id="post_id" name="post[id]">\n0</textarea>},
text_area("post", "id")