diff options
Diffstat (limited to 'actionpack/test/template')
16 files changed, 18 insertions, 46 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index bec29e134f..499f5e7fc1 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class ActiveRecordHelperTest < Test::Unit::TestCase include ActionView::Helpers::FormHelper diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 61ab5ab237..0d84816765 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class AssetTagHelperTest < Test::Unit::TestCase include ActionView::Helpers::TagHelper diff --git a/actionpack/test/template/atom_feed_helper_test.rb b/actionpack/test/template/atom_feed_helper_test.rb index 06484e07b9..9efc29fbdf 100644 --- a/actionpack/test/template/atom_feed_helper_test.rb +++ b/actionpack/test/template/atom_feed_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' Scroll = Struct.new(:id, :to_param, :title, :body, :updated_at, :created_at) diff --git a/actionpack/test/template/benchmark_helper_test.rb b/actionpack/test/template/benchmark_helper_test.rb index 85f08bc6a0..76c0780482 100644 --- a/actionpack/test/template/benchmark_helper_test.rb +++ b/actionpack/test/template/benchmark_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' require 'action_view/helpers/benchmark_helper' class BenchmarkHelperTest < Test::Unit::TestCase diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionpack/test/template/compiled_templates_test.rb index 40b5ce1ade..7c8d931b33 100644 --- a/actionpack/test/template/compiled_templates_test.rb +++ b/actionpack/test/template/compiled_templates_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' require 'action_view/helpers/date_helper' require 'action_view/compiled_templates' diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index c88d04775e..33b707a0c9 100755 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class DateHelperTest < Test::Unit::TestCase include ActionView::Helpers::DateHelper diff --git a/actionpack/test/template/erb_util_test.rb b/actionpack/test/template/erb_util_test.rb index 3aff987b22..fe599115df 100644 --- a/actionpack/test/template/erb_util_test.rb +++ b/actionpack/test/template/erb_util_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class ErbUtilTest < Test::Unit::TestCase include ERB::Util @@ -26,31 +26,3 @@ class ErbUtilTest < Test::Unit::TestCase end end end -require "#{File.dirname(__FILE__)}/../abstract_unit" - -class ErbUtilTest < Test::Unit::TestCase - include ERB::Util - - def test_amp - assert_equal '&', html_escape('&') - end - - def test_quot - assert_equal '"', html_escape('"') - end - - def test_lt - assert_equal '<', html_escape('<') - end - - def test_gt - assert_equal '>', html_escape('>') - end - - def test_rest_in_ascii - (0..127).to_a.map(&:chr).each do |chr| - next if %w(& " < >).include?(chr) - assert_equal chr, html_escape(chr) - end - end -end
\ No newline at end of file diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 37e3538b1e..a3dff7ec52 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' silence_warnings do Post = Struct.new(:title, :author_name, :body, :secret, :written_on, :cost) diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index 966a00ff0b..d4a64d4d3c 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class MockTimeZone attr_reader :name diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index d0f9e9903e..3ca3e743eb 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class FormTagHelperTest < Test::Unit::TestCase include ActionView::Helpers::UrlHelper diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index 0d44e96f84..581ca58f89 100644 --- a/actionpack/test/template/javascript_helper_test.rb +++ b/actionpack/test/template/javascript_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class JavaScriptHelperTest < Test::Unit::TestCase include ActionView::Helpers::JavaScriptHelper diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 19ca471245..b2f95cea9f 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class NumberHelperTest < Test::Unit::TestCase include ActionView::Helpers::NumberHelper diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 3978722419..47173a0cb1 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' Bunny = Struct.new(:Bunny, :id) diff --git a/actionpack/test/template/sanitize_helper_test.rb b/actionpack/test/template/sanitize_helper_test.rb index 7f2d2d9cc0..a840c8b4cb 100644 --- a/actionpack/test/template/sanitize_helper_test.rb +++ b/actionpack/test/template/sanitize_helper_test.rb @@ -1,5 +1,5 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" -require "#{File.dirname(__FILE__)}/../testing_sandbox" +require 'abstract_unit' +require 'testing_sandbox' # The exhaustive tests are in test/controller/html/sanitizer_test.rb. # This tests the that the helpers hook up correctly to the sanitizer classes. @@ -46,4 +46,4 @@ class SanitizeHelperTest < Test::Unit::TestCase def assert_sanitized(text, expected = nil) assert_equal((expected || text), sanitize(text)) end -end
\ No newline at end of file +end diff --git a/actionpack/test/template/scriptaculous_helper_test.rb b/actionpack/test/template/scriptaculous_helper_test.rb index 04fbe33d5d..8d55804fee 100644 --- a/actionpack/test/template/scriptaculous_helper_test.rb +++ b/actionpack/test/template/scriptaculous_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class ScriptaculousHelperTest < Test::Unit::TestCase include ActionView::Helpers::JavaScriptHelper diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index c7edc678ff..4b73289060 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -1,4 +1,4 @@ -require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'abstract_unit' class TagHelperTest < Test::Unit::TestCase include ActionView::Helpers::TagHelper |