aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-23 22:37:52 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-23 22:38:19 -0500
commit4a55d1de8d42694bd060d834c549c53c079dd747 (patch)
tree925ccc0313668a1b9187ed1e6688aee49994031b
parent3600c3840e8d0c612c974e6af5ce010535492fbe (diff)
downloadrails-4a55d1de8d42694bd060d834c549c53c079dd747.tar.gz
rails-4a55d1de8d42694bd060d834c549c53c079dd747.tar.bz2
rails-4a55d1de8d42694bd060d834c549c53c079dd747.zip
Move integration test runner into ActionDispatch
-rw-r--r--actionpack/lib/action_controller.rb4
-rw-r--r--actionpack/lib/action_controller/deprecated/integration_test.rb2
-rw-r--r--actionpack/lib/action_controller/deprecated/performance_test.rb1
-rw-r--r--actionpack/lib/action_dispatch.rb6
-rw-r--r--actionpack/lib/action_dispatch/testing/integration.rb (renamed from actionpack/lib/action_controller/testing/integration.rb)12
-rw-r--r--actionpack/lib/action_dispatch/testing/performance_test.rb (renamed from actionpack/lib/action_controller/testing/performance_test.rb)4
-rw-r--r--actionpack/test/abstract_unit.rb2
7 files changed, 20 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb
index 634206e065..362f451b60 100644
--- a/actionpack/lib/action_controller.rb
+++ b/actionpack/lib/action_controller.rb
@@ -21,8 +21,10 @@ module ActionController
# require 'action_controller/routing'
autoload :Caching, 'action_controller/caching'
autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
- autoload :Integration, 'action_controller/testing/integration'
+ autoload :Integration, 'action_controller/deprecated/integration_test'
+ autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
autoload :MimeResponds, 'action_controller/metal/mime_responds'
+ autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
autoload :RecordIdentifier, 'action_controller/record_identifier'
autoload :Resources, 'action_controller/routing/resources'
diff --git a/actionpack/lib/action_controller/deprecated/integration_test.rb b/actionpack/lib/action_controller/deprecated/integration_test.rb
new file mode 100644
index 0000000000..86336b6bc4
--- /dev/null
+++ b/actionpack/lib/action_controller/deprecated/integration_test.rb
@@ -0,0 +1,2 @@
+ActionController::Integration = ActionDispatch::Integration
+ActionController::IntegrationTest = ActionDispatch::IntegrationTest
diff --git a/actionpack/lib/action_controller/deprecated/performance_test.rb b/actionpack/lib/action_controller/deprecated/performance_test.rb
new file mode 100644
index 0000000000..fcf47d31a7
--- /dev/null
+++ b/actionpack/lib/action_controller/deprecated/performance_test.rb
@@ -0,0 +1 @@
+ActionController::PerformanceTest = ActionDispatch::PerformanceTest
diff --git a/actionpack/lib/action_dispatch.rb b/actionpack/lib/action_dispatch.rb
index 5bcd2143a3..be69a2062b 100644
--- a/actionpack/lib/action_dispatch.rb
+++ b/actionpack/lib/action_dispatch.rb
@@ -38,11 +38,15 @@ module ActionDispatch
autoload :ShowExceptions, 'action_dispatch/middleware/show_exceptions'
autoload :MiddlewareStack, 'action_dispatch/middleware/stack'
- autoload :HTML, 'action_controller/vendor/html-scanner'
autoload :Assertions, 'action_dispatch/testing/assertions'
+ autoload :Integration, 'action_dispatch/testing/integration'
+ autoload :IntegrationTest, 'action_dispatch/testing/integration'
+ autoload :PerformanceTest, 'action_dispatch/testing/performance_test'
autoload :TestRequest, 'action_dispatch/testing/test_request'
autoload :TestResponse, 'action_dispatch/testing/test_response'
+ autoload :HTML, 'action_controller/vendor/html-scanner'
+
module Http
autoload :Headers, 'action_dispatch/http/headers'
end
diff --git a/actionpack/lib/action_controller/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb
index 791f936f51..3f19a2560a 100644
--- a/actionpack/lib/action_controller/testing/integration.rb
+++ b/actionpack/lib/action_dispatch/testing/integration.rb
@@ -2,9 +2,11 @@ require 'stringio'
require 'uri'
require 'active_support/test_case'
require 'active_support/core_ext/object/metaclass'
-require 'rack/test'
-module ActionController
+# TODO: Remove circular dependency on ActionController
+require 'action_controller/testing/process'
+
+module ActionDispatch
module Integration #:nodoc:
module RequestHelpers
# Performs a GET request with the given parameters.
@@ -21,7 +23,7 @@ module ActionController
#
# This method returns an Response object, which one can use to
# inspect the details of the response. Furthermore, if this method was
- # called from an ActionController::IntegrationTest object, then that
+ # called from an ActionDispatch::IntegrationTest object, then that
# object's <tt>@response</tt> instance variable will point to the same
# response object.
#
@@ -191,11 +193,11 @@ module ActionController
unless defined? @named_routes_configured
# install the named routes in this session instance.
klass = metaclass
- Routing::Routes.install_helpers(klass)
+ ActionController::Routing::Routes.install_helpers(klass)
# the helpers are made protected by default--we make them public for
# easier access during testing and troubleshooting.
- klass.module_eval { public *Routing::Routes.named_routes.helpers }
+ klass.module_eval { public *ActionController::Routing::Routes.named_routes.helpers }
@named_routes_configured = true
end
end
diff --git a/actionpack/lib/action_controller/testing/performance_test.rb b/actionpack/lib/action_dispatch/testing/performance_test.rb
index d88180087d..b1ed9d31f4 100644
--- a/actionpack/lib/action_controller/testing/performance_test.rb
+++ b/actionpack/lib/action_dispatch/testing/performance_test.rb
@@ -1,14 +1,14 @@
require 'active_support/testing/performance'
require 'active_support/testing/default'
-module ActionController
+module ActionDispatch
# An integration test that runs a code profiler on your test methods.
# Profiling output for combinations of each test method, measurement, and
# output format are written to your tmp/performance directory.
#
# By default, process_time is measured and both flat and graph_html output
# formats are written, so you'll have two output files per test method.
- class PerformanceTest < ActionController::IntegrationTest
+ class PerformanceTest < ActionDispatch::IntegrationTest
include ActiveSupport::Testing::Performance
include ActiveSupport::Testing::Default
end
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index b9293ffb9f..134883ed19 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -27,8 +27,6 @@ require 'action_view/base'
require 'action_dispatch'
require 'active_model'
require 'fixture_template'
-require 'action_controller/testing/process'
-require 'action_controller/testing/integration'
require 'action_view/test_case'
require 'active_support/dependencies'