aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2011-05-22 23:13:44 -0700
committerwycats <wycats@gmail.com>2011-05-22 23:13:44 -0700
commitddc584e89eaf6845f8cd72bcafce5035c9893dbb (patch)
tree87d323e45b2eae1575887a14ca4c15d288d1869e /actionpack
parent0afefa95049766836e32e6a76873423d8640ebe3 (diff)
downloadrails-ddc584e89eaf6845f8cd72bcafce5035c9893dbb.tar.gz
rails-ddc584e89eaf6845f8cd72bcafce5035c9893dbb.tar.bz2
rails-ddc584e89eaf6845f8cd72bcafce5035c9893dbb.zip
Restructure TemplateAssertions-related code to eliminate circular requires.
Also, no need to include dependencies in AS::Concerns inside included blocks.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller.rb13
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions.rb13
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/response.rb7
3 files changed, 13 insertions, 20 deletions
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb
index eba5e9377b..f13fd71050 100644
--- a/actionpack/lib/action_controller.rb
+++ b/actionpack/lib/action_controller.rb
@@ -37,12 +37,13 @@ module ActionController
autoload :UrlFor
end
- autoload :Integration, 'action_controller/deprecated/integration_test'
- autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
- autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
- autoload :UrlWriter, 'action_controller/deprecated'
- autoload :Routing, 'action_controller/deprecated'
- autoload :TestCase, 'action_controller/test_case'
+ autoload :Integration, 'action_controller/deprecated/integration_test'
+ autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
+ autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
+ autoload :UrlWriter, 'action_controller/deprecated'
+ autoload :Routing, 'action_controller/deprecated'
+ autoload :TestCase, 'action_controller/test_case'
+ autoload :TemplateAssertions, 'action_controller/test_case'
eager_autoload do
autoload :RecordIdentifier
diff --git a/actionpack/lib/action_dispatch/testing/assertions.rb b/actionpack/lib/action_dispatch/testing/assertions.rb
index 822150b768..226baf9ad0 100644
--- a/actionpack/lib/action_dispatch/testing/assertions.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions.rb
@@ -8,12 +8,11 @@ module ActionDispatch
extend ActiveSupport::Concern
- included do
- include DomAssertions
- include ResponseAssertions
- include RoutingAssertions
- include SelectorAssertions
- include TagAssertions
- end
+ include DomAssertions
+ include ResponseAssertions
+ include RoutingAssertions
+ include SelectorAssertions
+ include TagAssertions
end
end
+
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb
index 3335742d47..606b01893e 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/response.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb
@@ -6,13 +6,6 @@ module ActionDispatch
module ResponseAssertions
extend ActiveSupport::Concern
- included do
- # TODO: Need to pull in AV::Template monkey patches that track which
- # templates are rendered. assert_template should probably be part
- # of AV instead of AD.
- require 'action_view/test_case'
- end
-
# Asserts that the response is one of the following types:
#
# * <tt>:success</tt> - Status code was 200