提交 08eafc96 编写于 作者: Y Yuki Nishijima

Eliminate a ruby warning in a test in Action View

This eliminates the warning below:

  actionview/test/template/form_helper_test.rb:913: warning: method redefined; discarding old id_came_from_user?
  actionview/test/template/form_helper_test.rb:104: warning: previous definition of id_came_from_user? was here
上级 1303288b
......@@ -910,7 +910,11 @@ def test_inputs_use_before_type_cast_to_retain_information_from_validations_like
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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册