From 982419b0734993d35484bc015e05620de6b97c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 3 Apr 2014 17:43:03 -0300 Subject: [PATCH] No need a custom helper --- test/form_builder/error_test.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/form_builder/error_test.rb b/test/form_builder/error_test.rb index 3821b9b4..ad8d871e 100644 --- a/test/form_builder/error_test.rb +++ b/test/form_builder/error_test.rb @@ -14,10 +14,6 @@ class ErrorTest < ActionView::TestCase end end - def with_custom_error_for(object, *args) - with_form_for(object, *args) - end - test 'error should not generate content for attribute without errors' do with_error_for @user, :active assert_no_select 'span.error' @@ -141,7 +137,7 @@ class ErrorTest < ActionView::TestCase test 'input with custom error works' do error_text = "Super User Name! can't be blank" - with_custom_error_for(@user, :name, error: error_text) + with_form_for @user, :name, error: error_text assert_select 'span.error', "#{error_text}" end @@ -149,7 +145,7 @@ class ErrorTest < ActionView::TestCase test 'input with custom error works when using full_error component' do swap_wrapper :default, self.custom_wrapper_with_full_error do error_text = "Super User Name! can't be blank" - with_custom_error_for(@user, :name, error: error_text) + with_form_for @user, :name, error: error_text assert_select 'span.error', "#{error_text}" end