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