Permalink
Browse files

Restructure TemplateAssertions-related code to eliminate circular req…

…uires.

Also, no need to include dependencies in AS::Concerns inside included blocks.
  • Loading branch information...
wycats committed May 23, 2011
1 parent 0afefa9 commit ddc584e89eaf6845f8cd72bcafce5035c9893dbb
@@ -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
@@ -8,12 +8,11 @@ module Assertions
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
+
@@ -6,13 +6,6 @@ module Assertions
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

1 comment on commit ddc584e

@joshk

This comment has been minimized.

Show comment Hide comment
@joshk

joshk May 23, 2011

Contributor

Wow, thanks for taking care of this one, @NZKoz and I were a little stumped on how to fix it

Contributor

joshk commented on ddc584e May 23, 2011

Wow, thanks for taking care of this one, @NZKoz and I were a little stumped on how to fix it

Please sign in to comment.