From 0990c1309dfa1751c1e1a48b48bfcb994ab68db0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 12 Dec 2004 11:31:54 +0000 Subject: Fixed all helpers so that they use XHTML compliant double quotes for values instead of single quotes [htonl/bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../test/template/active_record_helper_test.rb | 16 ++++----- actionpack/test/template/date_helper_test.rb | 40 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index 9cc0f58d0a..5bae7ee6b5 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -51,27 +51,27 @@ class ActiveRecordHelperTest < Test::Unit::TestCase def test_generic_input_tag assert_equal( - '', input("post", "title") + %(), input("post", "title") ) end def test_text_area_with_errors assert_equal( - "
", + %(
), text_area("post", "body") ) end def test_text_field_with_errors assert_equal( - '
', + %(
), text_field("post", "author_name") ) end def test_form_with_string assert_equal( - "


\n


", + %(


\n


), form("post") ) end @@ -80,7 +80,7 @@ class ActiveRecordHelperTest < Test::Unit::TestCase def Post.content_columns() [ Column.new(:date, "written_on", "Written on") ] end assert_equal( - "


\n\n\n

", + %(


\n\n\n

), form("post") ) end @@ -90,13 +90,13 @@ class ActiveRecordHelperTest < Test::Unit::TestCase @post.written_on = Time.gm(2004, 6, 15, 16, 30) assert_equal( - "


\n\n\n — \n : \n

", + %(


\n\n\n — \n : \n

), form("post") ) end def test_error_for_block - assert_equal "

1 error prohibited this post from being saved

There were problems with the following fields:

", error_messages_for("post") - assert_equal "

1 error prohibited this post from being saved

There were problems with the following fields:

", error_messages_for("post", :class => "errorDeathByClass", :id => "errorDeathById", :header_tag => "h1") + assert_equal %(

1 error prohibited this post from being saved

There were problems with the following fields:

), error_messages_for("post") + assert_equal %(

1 error prohibited this post from being saved

There were problems with the following fields:

), error_messages_for("post", :class => "errorDeathByClass", :id => "errorDeathById", :header_tag => "h1") end end diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index a8ad37918d..5e9d79b26e 100755 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -16,9 +16,9 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_day - expected = "\n) expected << -"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" +%(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_day(Time.mktime(2003, 8, 16)) @@ -26,9 +26,9 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_day_with_blank - expected = "\n) expected << -"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" +%(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_day(Time.mktime(2003, 8, 16), :include_blank => true) @@ -36,8 +36,8 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_month - expected = "\n) + expected << %(\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_month(Time.mktime(2003, 8, 16)) @@ -45,8 +45,8 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_month_with_numbers - expected = "\n) + expected << %(\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_month(Time.mktime(2003, 8, 16), :use_month_numbers => true) @@ -54,8 +54,8 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_month_with_numbers_and_names - expected = "\n) + expected << %(\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_month(Time.mktime(2003, 8, 16), :add_month_numbers => true) @@ -63,8 +63,8 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_year - expected = "\n) + expected << %(\n\n\n) expected << "\n" assert_equal expected, select_year(Time.mktime(2003, 8, 16), :start_year => 2003, :end_year => 2005) @@ -72,8 +72,8 @@ class DateHelperTest < Test::Unit::TestCase end def test_select_year_with_type_discarding - expected = "\n) + expected << %(\n\n\n) expected << "\n" assert_equal expected, select_year( @@ -84,17 +84,17 @@ class DateHelperTest < Test::Unit::TestCase def test_select_date - expected = "\n) + expected << %(\n\n\n) expected << "\n" - expected << "\n) + expected << %(\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" - expected << "\n) expected << -"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" +%(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n) expected << "\n" assert_equal expected, select_date( -- cgit v1.2.3