diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 07:16:55 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 07:16:55 +0000 |
commit | 0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4 (patch) | |
tree | 74705adf7f9a35c750f74657f0c4a29a6dcce5ff /actionpack/test/template | |
parent | 4ac332fa9a16ae86b948251e372999b9f4618dec (diff) | |
download | rails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.tar.gz rails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.tar.bz2 rails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.zip |
Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
18 files changed, 22 insertions, 37 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index 91f744ff83..c1dc73990d 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -1,11 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/date_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/form_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/text_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/tag_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/url_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/form_tag_helper' -# require File.dirname(__FILE__) + '/../../lib/action_view/helpers/active_record_helper' +require "#{File.dirname(__FILE__)}/../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 4a99e9d321..d80019c3f1 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 "#{File.dirname(__FILE__)}/../abstract_unit" class AssetTagHelperTest < Test::Unit::TestCase include ActionView::Helpers::TagHelper diff --git a/actionpack/test/template/benchmark_helper_test.rb b/actionpack/test/template/benchmark_helper_test.rb index 3c7d9b566e..85f08bc6a0 100644 --- a/actionpack/test/template/benchmark_helper_test.rb +++ b/actionpack/test/template/benchmark_helper_test.rb @@ -1,5 +1,5 @@ -require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/benchmark_helper' +require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'action_view/helpers/benchmark_helper' class BenchmarkHelperTest < Test::Unit::TestCase include ActionView::Helpers::BenchmarkHelper diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionpack/test/template/compiled_templates_test.rb index a64ae95743..8e8df25bb8 100644 --- a/actionpack/test/template/compiled_templates_test.rb +++ b/actionpack/test/template/compiled_templates_test.rb @@ -1,10 +1,8 @@ -require 'test/unit' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/date_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/compiled_templates' -require File.dirname(__FILE__) + "/../abstract_unit" +require "#{File.dirname(__FILE__)}/../abstract_unit" +require 'action_view/helpers/date_helper' +require 'action_view/compiled_templates' class CompiledTemplateTests < Test::Unit::TestCase - def setup @ct = ActionView::CompiledTemplates.new @v = Class.new diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index ae0494628b..07b0fa9c09 100755 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -1,5 +1,4 @@ -require 'test/unit' -require File.dirname(__FILE__) + "/../abstract_unit" +require "#{File.dirname(__FILE__)}/../abstract_unit" class DateHelperTest < Test::Unit::TestCase include ActionView::Helpers::DateHelper diff --git a/actionpack/test/template/deprecated_helper_test.rb b/actionpack/test/template/deprecated_helper_test.rb index 836bb035b1..1d4f7624f7 100644 --- a/actionpack/test/template/deprecated_helper_test.rb +++ b/actionpack/test/template/deprecated_helper_test.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' +require "#{File.dirname(__FILE__)}/../abstract_unit" class DeprecatedHelperTest < Test::Unit::TestCase include ActionView::Helpers::JavaScriptHelper diff --git a/actionpack/test/template/deprecated_instance_variables_test.rb b/actionpack/test/template/deprecated_instance_variables_test.rb index c6931ae9c2..3a8d620b34 100644 --- a/actionpack/test/template/deprecated_instance_variables_test.rb +++ b/actionpack/test/template/deprecated_instance_variables_test.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' +require "#{File.dirname(__FILE__)}/../abstract_unit" class DeprecatedViewInstanceVariablesTest < Test::Unit::TestCase class DeprecatedInstanceVariablesController < ActionController::Base diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 14a41f69e2..df9295e8b7 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 "#{File.dirname(__FILE__)}/../abstract_unit" class FormHelperTest < Test::Unit::TestCase include ActionView::Helpers::FormHelper diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index ad293417f5..3011614c65 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 "#{File.dirname(__FILE__)}/../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 7c42f9d4be..dc36d23604 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 "#{File.dirname(__FILE__)}/../abstract_unit" class FormTagHelperTest < Test::Unit::TestCase include ActionView::Helpers::UrlHelper diff --git a/actionpack/test/template/java_script_macros_helper_test.rb b/actionpack/test/template/java_script_macros_helper_test.rb index ac629b97da..10d77558f7 100644 --- a/actionpack/test/template/java_script_macros_helper_test.rb +++ b/actionpack/test/template/java_script_macros_helper_test.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' +require "#{File.dirname(__FILE__)}/../abstract_unit" class JavaScriptMacrosHelperTest < Test::Unit::TestCase include ActionView::Helpers::JavaScriptHelper diff --git a/actionpack/test/template/javascript_helper_test.rb b/actionpack/test/template/javascript_helper_test.rb index ea13f1ab73..a2454a03e4 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 "#{File.dirname(__FILE__)}/../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 75fcc82500..31f25f2ecb 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -1,5 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/number_helper' +require "#{File.dirname(__FILE__)}/../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 1b4f4408e3..cc8b650039 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 "#{File.dirname(__FILE__)}/../abstract_unit" module BaseTest include ActionView::Helpers::JavaScriptHelper diff --git a/actionpack/test/template/scriptaculous_helper_test.rb b/actionpack/test/template/scriptaculous_helper_test.rb index 3538ee0c6b..cb1171a640 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 "#{File.dirname(__FILE__)}/../abstract_unit" class ScriptaculousHelperTest < Test::Unit::TestCase include ActionView::Helpers::JavaScriptHelper @@ -87,4 +87,4 @@ class ScriptaculousHelperTest < Test::Unit::TestCase assert_dom_equal %(<script type=\"text/javascript\">\n//<![CDATA[\nDroppables.add(\"droptarget1\", {accept:['tshirts','mugs'], onDrop:function(element){new Ajax.Updater('infobox', 'http://www.example.com/', {asynchronous:true, evalScripts:true, parameters:'id=' + encodeURIComponent(element.id)})}})\n//]]>\n</script>), drop_receiving_element("droptarget1", :accept => ['tshirts','mugs'], :update => 'infobox') end -end
\ No newline at end of file +end diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 23992ee630..342c3843a1 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 "#{File.dirname(__FILE__)}/../abstract_unit" class TagHelperTest < Test::Unit::TestCase include ActionView::Helpers::TagHelper diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 18f2375969..2f11547db5 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' +require "#{File.dirname(__FILE__)}/../abstract_unit" require "#{File.dirname(__FILE__)}/../testing_sandbox" class TextHelperTest < Test::Unit::TestCase diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 4a772d5069..5f11461b62 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -1,8 +1,4 @@ -require File.dirname(__FILE__) + '/../abstract_unit' - -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/url_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/asset_tag_helper' -require File.dirname(__FILE__) + '/../../lib/action_view/helpers/tag_helper' +require "#{File.dirname(__FILE__)}/../abstract_unit" RequestMock = Struct.new("Request", :request_uri, :protocol, :host_with_port) |