From 18b73ddba4adfd3bd56e9bcf75f427b3b63069a0 Mon Sep 17 00:00:00 2001 From: Edison Date: Thu, 16 Feb 2012 15:07:03 -0200 Subject: [PATCH] test for errors messages with HTML tags --- test/form_builder/error_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/form_builder/error_test.rb b/test/form_builder/error_test.rb index ecbe88273..4a370c3d1 100644 --- a/test/form_builder/error_test.rb +++ b/test/form_builder/error_test.rb @@ -73,6 +73,12 @@ def with_full_error_for(object, *args) assert_no_select 'p.error[error_method]' end + test 'error should generate an error message with raw HTML tags' do + with_error_for @user, :name, :error_prefix => 'Name' + assert_select 'span.error', "Name can't be blank" + assert_select 'span.error b', "Name" + end + # FULL ERRORS test 'full error should generate an full error tag for the attribute' do