diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index b0297b6c01..4eab8f9ffd 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -53,6 +53,7 @@ require File.dirname(__FILE__) + '/assertions/tag_assertions' require File.dirname(__FILE__) + '/assertions/dom_assertions' require File.dirname(__FILE__) + '/assertions/routing_assertions' require File.dirname(__FILE__) + '/assertions/model_assertions' +require File.dirname(__FILE__) + '/assertions/deprecated_assertions' module Test #:nodoc: module Unit #:nodoc: @@ -63,6 +64,7 @@ module Test #:nodoc: include ActionController::Assertions::TagAssertions include ActionController::Assertions::DomAssertions include ActionController::Assertions::ModelAssertions + include ActionController::Assertions::DeprecatedAssertions def clean_backtrace(&block) yield diff --git a/actionpack/lib/action_controller/deprecated_assertions.rb b/actionpack/lib/action_controller/assertions/deprecated_assertions.rb similarity index 98% rename from actionpack/lib/action_controller/deprecated_assertions.rb rename to actionpack/lib/action_controller/assertions/deprecated_assertions.rb index dd94f4cee8..01262bdf08 100644 --- a/actionpack/lib/action_controller/deprecated_assertions.rb +++ b/actionpack/lib/action_controller/assertions/deprecated_assertions.rb @@ -1,10 +1,8 @@ -require 'test/unit' -require 'test/unit/assertions' require 'rexml/document' -module Test #:nodoc: - module Unit #:nodoc: - module Assertions +module ActionController #:nodoc: + module Assertions #:nodoc: + module DeprecatedAssertions def assert_success(message=nil) #:nodoc: assert_response(:success, message) end diff --git a/actionpack/lib/action_controller/assertions/dom_assertions.rb b/actionpack/lib/action_controller/assertions/dom_assertions.rb index a765dff2cc..d1eea59ea0 100644 --- a/actionpack/lib/action_controller/assertions/dom_assertions.rb +++ b/actionpack/lib/action_controller/assertions/dom_assertions.rb @@ -1,6 +1,3 @@ -require 'test/unit' -require 'test/unit/assertions' - module ActionController module Assertions module DomAssertions diff --git a/actionpack/lib/action_controller/assertions/model_assertions.rb b/actionpack/lib/action_controller/assertions/model_assertions.rb index b807a8902f..a9bcd7db9a 100644 --- a/actionpack/lib/action_controller/assertions/model_assertions.rb +++ b/actionpack/lib/action_controller/assertions/model_assertions.rb @@ -1,6 +1,3 @@ -require 'test/unit' -require 'test/unit/assertions' - module ActionController module Assertions module ModelAssertions diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index 5d5effc493..a3834e3a3e 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -1,5 +1,3 @@ -require 'test/unit' -require 'test/unit/assertions' require 'rexml/document' require File.dirname(__FILE__) + "/../vendor/html-scanner/html/document" diff --git a/actionpack/lib/action_controller/assertions/routing_assertions.rb b/actionpack/lib/action_controller/assertions/routing_assertions.rb index a94bb719f2..2ecf1b9e8e 100644 --- a/actionpack/lib/action_controller/assertions/routing_assertions.rb +++ b/actionpack/lib/action_controller/assertions/routing_assertions.rb @@ -1,6 +1,3 @@ -require 'test/unit' -require 'test/unit/assertions' - module ActionController module Assertions module RoutingAssertions diff --git a/actionpack/lib/action_controller/assertions/selector_assertions.rb b/actionpack/lib/action_controller/assertions/selector_assertions.rb index 7e22d6b655..7984e14c67 100644 --- a/actionpack/lib/action_controller/assertions/selector_assertions.rb +++ b/actionpack/lib/action_controller/assertions/selector_assertions.rb @@ -3,12 +3,9 @@ # Under MIT and/or CC By license. #++ -require 'test/unit' -require 'test/unit/assertions' require 'rexml/document' require File.dirname(__FILE__) + "/../vendor/html-scanner/html/document" - module ActionController module Assertions # Adds the #assert_select method for use in Rails functional diff --git a/actionpack/lib/action_controller/assertions/tag_assertions.rb b/actionpack/lib/action_controller/assertions/tag_assertions.rb index dc80b442b7..f5f7a23e61 100644 --- a/actionpack/lib/action_controller/assertions/tag_assertions.rb +++ b/actionpack/lib/action_controller/assertions/tag_assertions.rb @@ -1,5 +1,3 @@ -require 'test/unit' -require 'test/unit/assertions' require 'rexml/document' require File.dirname(__FILE__) + "/../vendor/html-scanner/html/document" diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index f6c7776b44..bfd2abbb48 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -1,9 +1,4 @@ -begin - require File.dirname(__FILE__) + '/assertions' - require File.dirname(__FILE__) + '/deprecated_assertions' -rescue Exception => e - print e -end +require File.dirname(__FILE__) + '/assertions' module ActionController #:nodoc: class Base