From b451de0d6de4df6bc66b274cec73b919f823d5ae Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 14 Aug 2010 02:13:00 -0300 Subject: Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) --- .../test/template/compiled_templates_test.rb | 2 +- actionpack/test/template/date_helper_i18n_test.rb | 2 +- actionpack/test/template/date_helper_test.rb | 28 ++++++------- actionpack/test/template/erb_util_test.rb | 2 +- .../test/template/form_options_helper_test.rb | 12 +++--- .../test/template/html-scanner/document_test.rb | 2 +- actionpack/test/template/html-scanner/node_test.rb | 18 ++++----- .../test/template/html-scanner/sanitizer_test.rb | 34 ++++++++-------- .../test/template/html-scanner/tag_node_test.rb | 46 +++++++++++----------- .../test/template/html-scanner/text_node_test.rb | 10 ++--- .../test/template/html-scanner/tokenizer_test.rb | 20 +++++----- actionpack/test/template/number_helper_test.rb | 2 +- actionpack/test/template/tag_helper_test.rb | 6 +-- actionpack/test/template/text_helper_test.rb | 12 +++--- .../test/template/translation_helper_test.rb | 8 ++-- actionpack/test/template/url_helper_test.rb | 4 +- 16 files changed, 104 insertions(+), 104 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionpack/test/template/compiled_templates_test.rb index 2c719757e4..3f31edd5ce 100644 --- a/actionpack/test/template/compiled_templates_test.rb +++ b/actionpack/test/template/compiled_templates_test.rb @@ -8,7 +8,7 @@ class CompiledTemplatesTest < Test::Unit::TestCase @compiled_templates.send(:remove_method, m) if m =~ /^_render_template_/ end end - + def test_template_gets_recompiled_when_using_different_keys_in_local_assigns assert_equal "one", render(:file => "test/render_file_with_locals_and_default.erb") assert_equal "two", render(:file => "test/render_file_with_locals_and_default.erb", :locals => { :secret => "two" }) diff --git a/actionpack/test/template/date_helper_i18n_test.rb b/actionpack/test/template/date_helper_i18n_test.rb index b69a449617..74498e4ffc 100644 --- a/actionpack/test/template/date_helper_i18n_test.rb +++ b/actionpack/test/template/date_helper_i18n_test.rb @@ -62,7 +62,7 @@ class DateHelperDistanceOfTimeInWordsI18nTests < Test::Unit::TestCase [:'about_x_years', 1] => 'about 1 year', [:'about_x_years', 2] => 'about 2 years', [:'over_x_years', 1] => 'over 1 year', - [:'over_x_years', 2] => 'over 2 years' + [:'over_x_years', 2] => 'over 2 years' }.each do |args, expected| key, count = *args diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index a1db49d4d0..0d9508dfe8 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -673,7 +673,7 @@ class DateHelperTest < ActionView::TestCase expected = %(\n) expected << %(\n) expected << %(\n) - + assert_dom_equal expected, select_date(Time.mktime(2003, 8, 16), :start_year => 2003, :end_year => 2005, :prefix => "date[first]", :order => [:day]) end @@ -897,7 +897,7 @@ class DateHelperTest < ActionView::TestCase assert_dom_equal expected, select_date(Time.mktime(2003, 8, 16), { :date_separator => " / ", :discard_day => true, :start_year => 2003, :end_year => 2005, :prefix => "date[first]"}) end - + def test_select_date_with_separator_discard_month_and_day expected = %(\n" - expected << " — " + expected << " — " expected << %(\n" - expected << " — " + expected << " — " expected << %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" @@ -1158,7 +1158,7 @@ class DateHelperTest < ActionView::TestCase expected = %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" @@ -1182,7 +1182,7 @@ class DateHelperTest < ActionView::TestCase expected = %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" @@ -1206,7 +1206,7 @@ class DateHelperTest < ActionView::TestCase expected = %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" @@ -1229,11 +1229,11 @@ class DateHelperTest < ActionView::TestCase expected = %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" - + expected << " : " expected << %(\n) expected << %(\n) expected << %(\n) - + expected << %(\n" @@ -2670,13 +2670,13 @@ class DateHelperTest < ActionView::TestCase assert select_time(Time.mktime(2003, 8, 16, 8, 4, 18), {}, :class => 'selector').html_safe? assert select_date(Time.mktime(2003, 8, 16), :date_separator => " / ", :start_year => 2003, :end_year => 2005, :prefix => "date[first]").html_safe? end - + def test_object_select_html_safety @post = Post.new @post.written_on = Date.new(2004, 6, 15) - assert date_select("post", "written_on", :default => Time.local(2006, 9, 19, 15, 16, 35), :include_blank => true).html_safe? - assert time_select("post", "written_on", :ignore_date => true).html_safe? + assert date_select("post", "written_on", :default => Time.local(2006, 9, 19, 15, 16, 35), :include_blank => true).html_safe? + assert time_select("post", "written_on", :ignore_date => true).html_safe? end protected diff --git a/actionpack/test/template/erb_util_test.rb b/actionpack/test/template/erb_util_test.rb index d3129d0e1a..d1891094e8 100644 --- a/actionpack/test/template/erb_util_test.rb +++ b/actionpack/test/template/erb_util_test.rb @@ -14,7 +14,7 @@ class ErbUtilTest < Test::Unit::TestCase end end end - + def test_html_escape_is_html_safe escaped = h("

") assert_equal "<p>", escaped diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index d14e5020c7..3dfaffbe97 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -305,7 +305,7 @@ class FormOptionsHelperTest < ActionView::TestCase output_buffer = fields_for :post, @post do |f| concat f.select(:category, %w( abe hest)) end - + assert_dom_equal( "", output_buffer @@ -438,11 +438,11 @@ class FormOptionsHelperTest < ActionView::TestCase def test_select_with_index_option @album = Album.new @album.id = 1 - - expected = "" + + expected = "" assert_dom_equal( - expected, + expected, select("album[]", "genre", %w[rap rock country], {}, { :index => nil }) ) end @@ -491,7 +491,7 @@ class FormOptionsHelperTest < ActionView::TestCase output_buffer = fields_for :post, @post do |f| concat f.collection_select(:author_name, dummy_posts, :author_name, :author_name) end - + assert_dom_equal( "", output_buffer @@ -599,7 +599,7 @@ class FormOptionsHelperTest < ActionView::TestCase output_buffer = fields_for :firm, @firm do |f| concat f.time_zone_select(:time_zone) end - + assert_dom_equal( "