aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-01-05 13:32:06 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-01-05 13:32:06 +0000
commit9d755f19837da703d494ff4c59c39a0066bbd961 (patch)
tree8075d8ea3cfbdf9b873cf348dc95680cb4636fad
parentf6d852665987142fb85ab26da9cc01f5d9b65d46 (diff)
downloadrails-9d755f19837da703d494ff4c59c39a0066bbd961.tar.gz
rails-9d755f19837da703d494ff4c59c39a0066bbd961.tar.bz2
rails-9d755f19837da703d494ff4c59c39a0066bbd961.zip
require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/test/action_view_test.rb3
-rw-r--r--actionpack/test/active_record_unit.rb7
-rw-r--r--actionpack/test/activerecord/active_record_store_test.rb3
-rw-r--r--actionpack/test/activerecord/render_partial_with_record_identification_test.rb2
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb2
-rw-r--r--actionpack/test/controller/addresses_render_test.rb2
-rw-r--r--actionpack/test/controller/assert_select_test.rb4
-rw-r--r--actionpack/test/controller/base_test.rb3
-rw-r--r--actionpack/test/controller/benchmark_test.rb3
-rw-r--r--actionpack/test/controller/caching_test.rb2
-rw-r--r--actionpack/test/controller/capture_test.rb2
-rwxr-xr-xactionpack/test/controller/cgi_test.rb2
-rw-r--r--actionpack/test/controller/components_test.rb2
-rw-r--r--actionpack/test/controller/content_type_test.rb4
-rw-r--r--actionpack/test/controller/cookie_test.rb2
-rw-r--r--actionpack/test/controller/custom_handler_test.rb2
-rw-r--r--actionpack/test/controller/deprecation/deprecated_base_methods_test.rb2
-rw-r--r--actionpack/test/controller/dispatcher_test.rb2
-rw-r--r--actionpack/test/controller/filter_params_test.rb2
-rw-r--r--actionpack/test/controller/filters_test.rb2
-rw-r--r--actionpack/test/controller/flash_test.rb2
-rw-r--r--actionpack/test/controller/fragment_store_setting_test.rb0
-rw-r--r--actionpack/test/controller/helper_test.rb2
-rw-r--r--actionpack/test/controller/html-scanner/document_test.rb3
-rw-r--r--actionpack/test/controller/html-scanner/node_test.rb3
-rw-r--r--actionpack/test/controller/html-scanner/sanitizer_test.rb3
-rw-r--r--actionpack/test/controller/html-scanner/tag_node_test.rb3
-rw-r--r--actionpack/test/controller/html-scanner/text_node_test.rb5
-rw-r--r--actionpack/test/controller/html-scanner/tokenizer_test.rb3
-rw-r--r--actionpack/test/controller/http_authentication_test.rb2
-rw-r--r--actionpack/test/controller/integration_test.rb3
-rw-r--r--actionpack/test/controller/layout_test.rb2
-rw-r--r--actionpack/test/controller/mime_responds_test.rb2
-rw-r--r--actionpack/test/controller/mime_type_test.rb2
-rw-r--r--actionpack/test/controller/new_render_test.rb4
-rw-r--r--actionpack/test/controller/polymorphic_routes_test.rb2
-rw-r--r--actionpack/test/controller/record_identifier_test.rb4
-rwxr-xr-xactionpack/test/controller/redirect_test.rb2
-rw-r--r--actionpack/test/controller/render_test.rb4
-rw-r--r--actionpack/test/controller/request_forgery_protection_test.rb2
-rw-r--r--actionpack/test/controller/request_test.rb2
-rw-r--r--actionpack/test/controller/rescue_test.rb2
-rw-r--r--actionpack/test/controller/resources_test.rb4
-rw-r--r--actionpack/test/controller/routing_test.rb4
-rw-r--r--actionpack/test/controller/selector_test.rb4
-rw-r--r--actionpack/test/controller/send_file_test.rb2
-rwxr-xr-xactionpack/test/controller/session/cookie_store_test.rb2
-rw-r--r--actionpack/test/controller/session/mem_cache_store_test.rb2
-rw-r--r--actionpack/test/controller/session_fixation_test.rb2
-rw-r--r--actionpack/test/controller/session_management_test.rb2
-rw-r--r--actionpack/test/controller/test_test.rb5
-rw-r--r--actionpack/test/controller/url_rewriter_test.rb2
-rw-r--r--actionpack/test/controller/verification_test.rb2
-rw-r--r--actionpack/test/controller/view_paths_test.rb4
-rw-r--r--actionpack/test/controller/webservice_test.rb2
-rw-r--r--actionpack/test/template/active_record_helper_test.rb2
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb2
-rw-r--r--actionpack/test/template/atom_feed_helper_test.rb2
-rw-r--r--actionpack/test/template/benchmark_helper_test.rb2
-rw-r--r--actionpack/test/template/compiled_templates_test.rb2
-rwxr-xr-xactionpack/test/template/date_helper_test.rb2
-rw-r--r--actionpack/test/template/erb_util_test.rb30
-rw-r--r--actionpack/test/template/form_helper_test.rb2
-rw-r--r--actionpack/test/template/form_options_helper_test.rb2
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb2
-rw-r--r--actionpack/test/template/javascript_helper_test.rb2
-rw-r--r--actionpack/test/template/number_helper_test.rb2
-rw-r--r--actionpack/test/template/prototype_helper_test.rb2
-rw-r--r--actionpack/test/template/sanitize_helper_test.rb6
-rw-r--r--actionpack/test/template/scriptaculous_helper_test.rb2
-rw-r--r--actionpack/test/template/tag_helper_test.rb2
71 files changed, 84 insertions, 127 deletions
diff --git a/actionpack/test/action_view_test.rb b/actionpack/test/action_view_test.rb
index a69ff36f9f..fb27fbfec4 100644
--- a/actionpack/test/action_view_test.rb
+++ b/actionpack/test/action_view_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class ActionViewTests < Test::Unit::TestCase
def test_find_template_extension_from_first_render
diff --git a/actionpack/test/active_record_unit.rb b/actionpack/test/active_record_unit.rb
index 5f2745b593..d4cc474478 100644
--- a/actionpack/test/active_record_unit.rb
+++ b/actionpack/test/active_record_unit.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/abstract_unit'
+require 'abstract_unit'
# Define the essentials
class ActiveRecordTestConnector
@@ -84,7 +84,6 @@ class ActiveRecordTestConnector
end
end
-# Test case for inheritance
class ActiveRecordTestCase < Test::Unit::TestCase
# Set our fixture path
if ActiveRecordTestConnector.able_to_connect
@@ -100,9 +99,7 @@ class ActiveRecordTestCase < Test::Unit::TestCase
super if ActiveRecordTestConnector.connected
end
- # Default so Test::Unit::TestCase doesn't complain
- def test_truth
- end
+ def default_test; end
end
ActiveRecordTestConnector.setup
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb
index 61900ac252..fd7da89aa7 100644
--- a/actionpack/test/activerecord/active_record_store_test.rb
+++ b/actionpack/test/activerecord/active_record_store_test.rb
@@ -1,9 +1,8 @@
# These tests exercise CGI::Session::ActiveRecordStore, so you're going to
# need AR in a sibling directory to AP and have SQLite installed.
-require File.dirname(__FILE__) + '/../active_record_unit'
+require 'active_record_unit'
require 'action_controller/session/active_record_store'
-
module CommonActiveRecordStoreTests
def test_basics
s = session_class.new(:session_id => '1234', :data => { 'foo' => 'bar' })
diff --git a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb b/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
index ccebbefead..1cfd2a2354 100644
--- a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
+++ b/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../active_record_unit'
+require 'active_record_unit'
class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase
fixtures :developers, :projects, :developers_projects, :topics, :replies
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index b1006f82be..1db057580b 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
# a controller class to facilitate the tests
class ActionPackAssertionsController < ActionController::Base
diff --git a/actionpack/test/controller/addresses_render_test.rb b/actionpack/test/controller/addresses_render_test.rb
index d1e9122dc9..a31734203d 100644
--- a/actionpack/test/controller/addresses_render_test.rb
+++ b/actionpack/test/controller/addresses_render_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Address
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb
index b0f3d6cedc..c8ad56cbc0 100644
--- a/actionpack/test/controller/assert_select_test.rb
+++ b/actionpack/test/controller/assert_select_test.rb
@@ -3,8 +3,8 @@
# Under MIT and/or CC By license.
#++
-require "#{File.dirname(__FILE__)}/../abstract_unit"
-require "#{File.dirname(__FILE__)}/fake_controllers"
+require 'abstract_unit'
+require 'controller/fake_controllers'
unless defined?(ActionMailer)
diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb
index 749db2918a..1a8bd6dfe9 100644
--- a/actionpack/test/controller/base_test.rb
+++ b/actionpack/test/controller/base_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
# Provide some controller to run the tests on.
diff --git a/actionpack/test/controller/benchmark_test.rb b/actionpack/test/controller/benchmark_test.rb
index f346e575e3..608ea5f5a9 100644
--- a/actionpack/test/controller/benchmark_test.rb
+++ b/actionpack/test/controller/benchmark_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
# Provide some static controllers.
class BenchmarkedController < ActionController::Base
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 15eb4c943a..12397ee8c0 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -1,5 +1,5 @@
require 'fileutils'
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
CACHE_DIR = 'test_cache'
# Don't change '/../temp/' cavalierly or you might hose something you don't want hosed
diff --git a/actionpack/test/controller/capture_test.rb b/actionpack/test/controller/capture_test.rb
index 7ec5f32a37..aaafea3920 100644
--- a/actionpack/test/controller/capture_test.rb
+++ b/actionpack/test/controller/capture_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CaptureController < ActionController::Base
def self.controller_name; "test"; end
diff --git a/actionpack/test/controller/cgi_test.rb b/actionpack/test/controller/cgi_test.rb
index 021781df98..c0bb028d29 100755
--- a/actionpack/test/controller/cgi_test.rb
+++ b/actionpack/test/controller/cgi_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'action_controller/cgi_process'
class BaseCgiTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb
index debd8a2742..82c55483dd 100644
--- a/actionpack/test/controller/components_test.rb
+++ b/actionpack/test/controller/components_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CallerController < ActionController::Base
def calling_from_controller
diff --git a/actionpack/test/controller/content_type_test.rb b/actionpack/test/controller/content_type_test.rb
index 1841d37c0b..d262ce8103 100644
--- a/actionpack/test/controller/content_type_test.rb
+++ b/actionpack/test/controller/content_type_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class ContentTypeController < ActionController::Base
def render_content_type_from_body
@@ -136,4 +136,4 @@ class ContentTypeTest < Test::Unit::TestCase
get :render_default_content_types_for_respond_to
assert_equal Mime::XML, @response.content_type
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb
index 6a833fee32..6a82a26261 100644
--- a/actionpack/test/controller/cookie_test.rb
+++ b/actionpack/test/controller/cookie_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CookieTest < Test::Unit::TestCase
class TestController < ActionController::Base
diff --git a/actionpack/test/controller/custom_handler_test.rb b/actionpack/test/controller/custom_handler_test.rb
index 2747a0f3ca..672ffeeaf8 100644
--- a/actionpack/test/controller/custom_handler_test.rb
+++ b/actionpack/test/controller/custom_handler_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CustomHandler
def initialize( view )
diff --git a/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
index 6d7157e1a5..8c1a8954a5 100644
--- a/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
+++ b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
+require 'abstract_unit'
class DeprecatedBaseMethodsTest < Test::Unit::TestCase
class Target < ActionController::Base
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb
index cdaf2bdae5..c174e51189 100644
--- a/actionpack/test/controller/dispatcher_test.rb
+++ b/actionpack/test/controller/dispatcher_test.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../abstract_unit"
+require 'abstract_unit'
uses_mocha 'dispatcher tests' do
diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb
index 7b810b1624..11adacb5e3 100644
--- a/actionpack/test/controller/filter_params_test.rb
+++ b/actionpack/test/controller/filter_params_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class FilterParamController < ActionController::Base
end
diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb
index 188e75afdf..d149ee1b18 100644
--- a/actionpack/test/controller/filters_test.rb
+++ b/actionpack/test/controller/filters_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
# FIXME: crashes Ruby 1.9
class FilterTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb
index 4a6f3c9e0b..f672f2f427 100644
--- a/actionpack/test/controller/flash_test.rb
+++ b/actionpack/test/controller/flash_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class FlashTest < Test::Unit::TestCase
class TestController < ActionController::Base
diff --git a/actionpack/test/controller/fragment_store_setting_test.rb b/actionpack/test/controller/fragment_store_setting_test.rb
deleted file mode 100644
index e69de29bb2..0000000000
--- a/actionpack/test/controller/fragment_store_setting_test.rb
+++ /dev/null
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index 117f73b768..829d715ae4 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
ActionController::Helpers::HELPERS_DIR.replace File.dirname(__FILE__) + '/../fixtures/helpers'
diff --git a/actionpack/test/controller/html-scanner/document_test.rb b/actionpack/test/controller/html-scanner/document_test.rb
index 0719883f31..0519533dbd 100644
--- a/actionpack/test/controller/html-scanner/document_test.rb
+++ b/actionpack/test/controller/html-scanner/document_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class DocumentTest < Test::Unit::TestCase
def test_handle_doctype
diff --git a/actionpack/test/controller/html-scanner/node_test.rb b/actionpack/test/controller/html-scanner/node_test.rb
index 1cf0a4bb67..240f01ac8b 100644
--- a/actionpack/test/controller/html-scanner/node_test.rb
+++ b/actionpack/test/controller/html-scanner/node_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class NodeTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/html-scanner/sanitizer_test.rb b/actionpack/test/controller/html-scanner/sanitizer_test.rb
index fc39a2a0de..a2f28eb5cf 100644
--- a/actionpack/test/controller/html-scanner/sanitizer_test.rb
+++ b/actionpack/test/controller/html-scanner/sanitizer_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class SanitizerTest < Test::Unit::TestCase
def setup
diff --git a/actionpack/test/controller/html-scanner/tag_node_test.rb b/actionpack/test/controller/html-scanner/tag_node_test.rb
index daeada9b9c..d1d4667378 100644
--- a/actionpack/test/controller/html-scanner/tag_node_test.rb
+++ b/actionpack/test/controller/html-scanner/tag_node_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class TagNodeTest < Test::Unit::TestCase
def test_open_without_attributes
diff --git a/actionpack/test/controller/html-scanner/text_node_test.rb b/actionpack/test/controller/html-scanner/text_node_test.rb
index 9853701fda..1ab3f4454e 100644
--- a/actionpack/test/controller/html-scanner/text_node_test.rb
+++ b/actionpack/test/controller/html-scanner/text_node_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class TextNodeTest < Test::Unit::TestCase
def setup
@@ -48,4 +47,4 @@ class TextNodeTest < Test::Unit::TestCase
def test_match_other
assert_nil @node.match(:hello)
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/html-scanner/tokenizer_test.rb b/actionpack/test/controller/html-scanner/tokenizer_test.rb
index 437136b9a7..53f032ac17 100644
--- a/actionpack/test/controller/html-scanner/tokenizer_test.rb
+++ b/actionpack/test/controller/html-scanner/tokenizer_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class TokenizerTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/http_authentication_test.rb b/actionpack/test/controller/http_authentication_test.rb
index 6f7b31a41b..c0069e8032 100644
--- a/actionpack/test/controller/http_authentication_test.rb
+++ b/actionpack/test/controller/http_authentication_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class HttpBasicAuthenticationTest < Test::Unit::TestCase
include ActionController::HttpAuthentication::Basic
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 2aea6eaaaa..83571f5e5e 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
+require 'abstract_unit'
require 'action_controller/integration'
uses_mocha 'integration' do
diff --git a/actionpack/test/controller/layout_test.rb b/actionpack/test/controller/layout_test.rb
index 85cc3a0843..1a2134847e 100644
--- a/actionpack/test/controller/layout_test.rb
+++ b/actionpack/test/controller/layout_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
# The view_paths array must be set on Base and not LayoutTest so that LayoutTest's inherited
# method has access to the view_paths array when looking for a layout to automatically assign.
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index f121dd9f8b..ce89b9dbbb 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class RespondToController < ActionController::Base
layout :set_layout
diff --git a/actionpack/test/controller/mime_type_test.rb b/actionpack/test/controller/mime_type_test.rb
index d4aea3c01c..5f29393fce 100644
--- a/actionpack/test/controller/mime_type_test.rb
+++ b/actionpack/test/controller/mime_type_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class MimeTypeTest < Test::Unit::TestCase
Mime::Type.register "image/png", :png
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index d8364a6a0b..e06737ee0b 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require File.dirname(__FILE__) + '/fake_models'
+require 'abstract_unit'
+require 'controller/fake_models'
class CustomersController < ActionController::Base
end
diff --git a/actionpack/test/controller/polymorphic_routes_test.rb b/actionpack/test/controller/polymorphic_routes_test.rb
index 3e72063e9e..51d71d1955 100644
--- a/actionpack/test/controller/polymorphic_routes_test.rb
+++ b/actionpack/test/controller/polymorphic_routes_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Article
attr_reader :id
diff --git a/actionpack/test/controller/record_identifier_test.rb b/actionpack/test/controller/record_identifier_test.rb
index 86d196cfd5..def8613215 100644
--- a/actionpack/test/controller/record_identifier_test.rb
+++ b/actionpack/test/controller/record_identifier_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Comment
attr_reader :id
@@ -100,4 +100,4 @@ class NestedRecordIdentifierTest < RecordIdentifierTest
assert_equal expected, partial_path(@record)
assert_equal expected, partial_path(Comment::Nested)
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index 4a3b8254aa..5642792ca2 100755
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class WorkshopsController < ActionController::Base
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 2827d7b718..1d83b37658 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require File.dirname(__FILE__) + '/fake_models'
+require 'abstract_unit'
+require 'controller/fake_models'
module Fun
class GamesController < ActionController::Base
diff --git a/actionpack/test/controller/request_forgery_protection_test.rb b/actionpack/test/controller/request_forgery_protection_test.rb
index 616ff4f217..4fcdc7ed4a 100644
--- a/actionpack/test/controller/request_forgery_protection_test.rb
+++ b/actionpack/test/controller/request_forgery_protection_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'digest/sha1'
ActionController::Routing::Routes.draw do |map|
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb
index 67eb58a75a..520358f739 100644
--- a/actionpack/test/controller/request_test.rb
+++ b/actionpack/test/controller/request_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'action_controller/integration'
class RequestTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb
index a63fd06005..55631e0777 100644
--- a/actionpack/test/controller/rescue_test.rb
+++ b/actionpack/test/controller/rescue_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
uses_mocha 'rescue' do
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 8772e66283..9031c633ca 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class ResourcesController < ActionController::Base
def index() render :nothing => true end
@@ -784,4 +784,4 @@ class ResourcesTest < Test::Unit::TestCase
end
true
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 281ef13b31..177b95a3af 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1,5 +1,5 @@
-require "#{File.dirname(__FILE__)}/../abstract_unit"
-require "#{File.dirname(__FILE__)}/fake_controllers"
+require 'abstract_unit'
+require 'controller/fake_controllers'
require 'action_controller/routing'
class MilestonesController < ActionController::Base
diff --git a/actionpack/test/controller/selector_test.rb b/actionpack/test/controller/selector_test.rb
index ca106ba236..4e31b4573c 100644
--- a/actionpack/test/controller/selector_test.rb
+++ b/actionpack/test/controller/selector_test.rb
@@ -3,8 +3,8 @@
# Under MIT and/or CC By license.
#++
-require "#{File.dirname(__FILE__)}/../abstract_unit"
-require "#{File.dirname(__FILE__)}/fake_controllers"
+require 'abstract_unit'
+require 'controller/fake_controllers'
class SelectorTest < Test::Unit::TestCase
#
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb
index 2d876c1bb0..8fa700d387 100644
--- a/actionpack/test/controller/send_file_test.rb
+++ b/actionpack/test/controller/send_file_test.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'abstract_unit')
+require 'abstract_unit'
module TestFileUtils
diff --git a/actionpack/test/controller/session/cookie_store_test.rb b/actionpack/test/controller/session/cookie_store_test.rb
index b2655c72d9..0fdfa29568 100755
--- a/actionpack/test/controller/session/cookie_store_test.rb
+++ b/actionpack/test/controller/session/cookie_store_test.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../../abstract_unit"
+require 'abstract_unit'
require 'action_controller/cgi_process'
require 'action_controller/cgi_ext'
diff --git a/actionpack/test/controller/session/mem_cache_store_test.rb b/actionpack/test/controller/session/mem_cache_store_test.rb
index 3afb7a8ea9..df48e6d9c5 100644
--- a/actionpack/test/controller/session/mem_cache_store_test.rb
+++ b/actionpack/test/controller/session/mem_cache_store_test.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../../abstract_unit"
+require 'abstract_unit'
require 'action_controller/cgi_process'
require 'action_controller/cgi_ext'
diff --git a/actionpack/test/controller/session_fixation_test.rb b/actionpack/test/controller/session_fixation_test.rb
index 34a7aa2d0d..164438c513 100644
--- a/actionpack/test/controller/session_fixation_test.rb
+++ b/actionpack/test/controller/session_fixation_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class SessionFixationTest < Test::Unit::TestCase
diff --git a/actionpack/test/controller/session_management_test.rb b/actionpack/test/controller/session_management_test.rb
index 44fb93104c..495a9153f8 100644
--- a/actionpack/test/controller/session_management_test.rb
+++ b/actionpack/test/controller/session_management_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class SessionManagementTest < Test::Unit::TestCase
class SessionOffController < ActionController::Base
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 68eee4f4a3..57c97a326c 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -1,6 +1,5 @@
-require "#{File.dirname(__FILE__)}/../abstract_unit"
-require "#{File.dirname(__FILE__)}/fake_controllers"
-require "action_controller/test_case"
+require 'abstract_unit'
+require 'controller/fake_controllers'
class TestTest < Test::Unit::TestCase
class TestController < ActionController::Base
diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb
index 75497c832c..ffc45b513e 100644
--- a/actionpack/test/controller/url_rewriter_test.rb
+++ b/actionpack/test/controller/url_rewriter_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
ActionController::UrlRewriter
diff --git a/actionpack/test/controller/verification_test.rb b/actionpack/test/controller/verification_test.rb
index e61bd5cccb..d6fde35f83 100644
--- a/actionpack/test/controller/verification_test.rb
+++ b/actionpack/test/controller/verification_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class VerificationTest < Test::Unit::TestCase
class TestController < ActionController::Base
diff --git a/actionpack/test/controller/view_paths_test.rb b/actionpack/test/controller/view_paths_test.rb
index e29e2b9f3c..889c5161d4 100644
--- a/actionpack/test/controller/view_paths_test.rb
+++ b/actionpack/test/controller/view_paths_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class ViewLoadPathsTest < Test::Unit::TestCase
@@ -134,4 +134,4 @@ class ViewLoadPathsTest < Test::Unit::TestCase
assert_equal ['c/path'], C.view_paths
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb
index d89de5c8f8..1ef1392236 100644
--- a/actionpack/test/controller/webservice_test.rb
+++ b/actionpack/test/controller/webservice_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class WebServiceTest < Test::Unit::TestCase
class MockCGI < CGI #:nodoc:
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 '&amp;', html_escape('&')
- end
-
- def test_quot
- assert_equal '&quot;', html_escape('"')
- end
-
- def test_lt
- assert_equal '&lt;', html_escape('<')
- end
-
- def test_gt
- assert_equal '&gt;', 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