Permalink
Browse files

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
  • Loading branch information...
1 parent f6d8526 commit 9d755f19837da703d494ff4c59c39a0066bbd961 @jeremy jeremy committed Jan 5, 2008
Showing with 84 additions and 127 deletions.
  1. +1 −2 actionpack/test/action_view_test.rb
  2. +2 −5 actionpack/test/active_record_unit.rb
  3. +1 −2 actionpack/test/activerecord/active_record_store_test.rb
  4. +1 −1 actionpack/test/activerecord/render_partial_with_record_identification_test.rb
  5. +1 −1 actionpack/test/controller/action_pack_assertions_test.rb
  6. +1 −1 actionpack/test/controller/addresses_render_test.rb
  7. +2 −2 actionpack/test/controller/assert_select_test.rb
  8. +1 −2 actionpack/test/controller/base_test.rb
  9. +1 −2 actionpack/test/controller/benchmark_test.rb
  10. +1 −1 actionpack/test/controller/caching_test.rb
  11. +1 −1 actionpack/test/controller/capture_test.rb
  12. +1 −1 actionpack/test/controller/cgi_test.rb
  13. +1 −1 actionpack/test/controller/components_test.rb
  14. +2 −2 actionpack/test/controller/content_type_test.rb
  15. +1 −1 actionpack/test/controller/cookie_test.rb
  16. +1 −1 actionpack/test/controller/custom_handler_test.rb
  17. +1 −1 actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
  18. +1 −1 actionpack/test/controller/dispatcher_test.rb
  19. +1 −1 actionpack/test/controller/filter_params_test.rb
  20. +1 −1 actionpack/test/controller/filters_test.rb
  21. +1 −1 actionpack/test/controller/flash_test.rb
  22. 0 actionpack/test/controller/fragment_store_setting_test.rb
  23. +1 −1 actionpack/test/controller/helper_test.rb
  24. +1 −2 actionpack/test/controller/html-scanner/document_test.rb
  25. +1 −2 actionpack/test/controller/html-scanner/node_test.rb
  26. +1 −2 actionpack/test/controller/html-scanner/sanitizer_test.rb
  27. +1 −2 actionpack/test/controller/html-scanner/tag_node_test.rb
  28. +2 −3 actionpack/test/controller/html-scanner/text_node_test.rb
  29. +1 −2 actionpack/test/controller/html-scanner/tokenizer_test.rb
  30. +1 −1 actionpack/test/controller/http_authentication_test.rb
  31. +1 −2 actionpack/test/controller/integration_test.rb
  32. +1 −1 actionpack/test/controller/layout_test.rb
  33. +1 −1 actionpack/test/controller/mime_responds_test.rb
  34. +1 −1 actionpack/test/controller/mime_type_test.rb
  35. +2 −2 actionpack/test/controller/new_render_test.rb
  36. +1 −1 actionpack/test/controller/polymorphic_routes_test.rb
  37. +2 −2 actionpack/test/controller/record_identifier_test.rb
  38. +1 −1 actionpack/test/controller/redirect_test.rb
  39. +2 −2 actionpack/test/controller/render_test.rb
  40. +1 −1 actionpack/test/controller/request_forgery_protection_test.rb
  41. +1 −1 actionpack/test/controller/request_test.rb
  42. +1 −1 actionpack/test/controller/rescue_test.rb
  43. +2 −2 actionpack/test/controller/resources_test.rb
  44. +2 −2 actionpack/test/controller/routing_test.rb
  45. +2 −2 actionpack/test/controller/selector_test.rb
  46. +1 −1 actionpack/test/controller/send_file_test.rb
  47. +1 −1 actionpack/test/controller/session/cookie_store_test.rb
  48. +1 −1 actionpack/test/controller/session/mem_cache_store_test.rb
  49. +1 −1 actionpack/test/controller/session_fixation_test.rb
  50. +1 −1 actionpack/test/controller/session_management_test.rb
  51. +2 −3 actionpack/test/controller/test_test.rb
  52. +1 −1 actionpack/test/controller/url_rewriter_test.rb
  53. +1 −1 actionpack/test/controller/verification_test.rb
  54. +2 −2 actionpack/test/controller/view_paths_test.rb
  55. +1 −1 actionpack/test/controller/webservice_test.rb
  56. +1 −1 actionpack/test/template/active_record_helper_test.rb
  57. +1 −1 actionpack/test/template/asset_tag_helper_test.rb
  58. +1 −1 actionpack/test/template/atom_feed_helper_test.rb
  59. +1 −1 actionpack/test/template/benchmark_helper_test.rb
  60. +1 −1 actionpack/test/template/compiled_templates_test.rb
  61. +1 −1 actionpack/test/template/date_helper_test.rb
  62. +1 −29 actionpack/test/template/erb_util_test.rb
  63. +1 −1 actionpack/test/template/form_helper_test.rb
  64. +1 −1 actionpack/test/template/form_options_helper_test.rb
  65. +1 −1 actionpack/test/template/form_tag_helper_test.rb
  66. +1 −1 actionpack/test/template/javascript_helper_test.rb
  67. +1 −1 actionpack/test/template/number_helper_test.rb
  68. +1 −1 actionpack/test/template/prototype_helper_test.rb
  69. +3 −3 actionpack/test/template/sanitize_helper_test.rb
  70. +1 −1 actionpack/test/template/scriptaculous_helper_test.rb
  71. +1 −1 actionpack/test/template/tag_helper_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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/abstract_unit'
+require 'abstract_unit'
# Define the essentials
class ActiveRecordTestConnector
@@ -84,7 +84,6 @@ def require_fixture_models
end
end
-# Test case for inheritance
class ActiveRecordTestCase < Test::Unit::TestCase
# Set our fixture path
if ActiveRecordTestConnector.able_to_connect
@@ -100,9 +99,7 @@ def run(*args)
super if ActiveRecordTestConnector.connected
end
- # Default so Test::Unit::TestCase doesn't complain
- def test_truth
- end
+ def default_test; end
end
ActiveRecordTestConnector.setup
@@ -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' })
@@ -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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
# a controller class to facilitate the tests
class ActionPackAssertionsController < ActionController::Base
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Address
@@ -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)
@@ -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.
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
# Provide some static controllers.
class BenchmarkedController < ActionController::Base
@@ -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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CaptureController < ActionController::Base
def self.controller_name; "test"; end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'action_controller/cgi_process'
class BaseCgiTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CallerController < ActionController::Base
def calling_from_controller
@@ -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 @@ def test_render_default_content_types_for_respond_to_with_overwrite
get :render_default_content_types_for_respond_to
assert_equal Mime::XML, @response.content_type
end
-end
+end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CookieTest < Test::Unit::TestCase
class TestController < ActionController::Base
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class CustomHandler
def initialize( view )
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
+require 'abstract_unit'
class DeprecatedBaseMethodsTest < Test::Unit::TestCase
class Target < ActionController::Base
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../abstract_unit"
+require 'abstract_unit'
uses_mocha 'dispatcher tests' do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class FilterParamController < ActionController::Base
end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
# FIXME: crashes Ruby 1.9
class FilterTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class FlashTest < Test::Unit::TestCase
class TestController < ActionController::Base
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
ActionController::Helpers::HELPERS_DIR.replace File.dirname(__FILE__) + '/../fixtures/helpers'
@@ -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
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class NodeTest < Test::Unit::TestCase
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class SanitizerTest < Test::Unit::TestCase
def setup
@@ -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
@@ -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 @@ def test_match_hash
def test_match_other
assert_nil @node.match(:hello)
end
-end
+end
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../abstract_unit'
-require 'test/unit'
+require 'abstract_unit'
class TokenizerTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class HttpBasicAuthenticationTest < Test::Unit::TestCase
include ActionController::HttpAuthentication::Basic
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
-
+require 'abstract_unit'
require 'action_controller/integration'
uses_mocha 'integration' do
@@ -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.
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class RespondToController < ActionController::Base
layout :set_layout
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class MimeTypeTest < Test::Unit::TestCase
Mime::Type.register "image/png", :png
@@ -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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Article
attr_reader :id
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class Comment
attr_reader :id
@@ -100,4 +100,4 @@ def test_partial_path
assert_equal expected, partial_path(@record)
assert_equal expected, partial_path(Comment::Nested)
end
-end
+end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class WorkshopsController < ActionController::Base
end
@@ -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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'digest/sha1'
ActionController::Routing::Routes.draw do |map|
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
require 'action_controller/integration'
class RequestTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
uses_mocha 'rescue' do
@@ -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 @@ def distinct_routes? (r1, r2)
end
true
end
-end
+end
@@ -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
@@ -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
#
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), '..', 'abstract_unit')
+require 'abstract_unit'
module TestFileUtils
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../../abstract_unit"
+require 'abstract_unit'
require 'action_controller/cgi_process'
require 'action_controller/cgi_ext'
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}/../../abstract_unit"
+require 'abstract_unit'
require 'action_controller/cgi_process'
require 'action_controller/cgi_ext'
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class SessionFixationTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class SessionManagementTest < Test::Unit::TestCase
class SessionOffController < ActionController::Base
@@ -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
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
ActionController::UrlRewriter
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../abstract_unit'
+require 'abstract_unit'
class VerificationTest < Test::Unit::TestCase
class TestController < ActionController::Base
Oops, something went wrong.

0 comments on commit 9d755f1

Please sign in to comment.