diff --git a/actionpack/lib/action_dispatch/testing/assertions.rb b/actionpack/lib/action_dispatch/testing/assertions.rb index 96f08f2355..0e4a92048f 100644 --- a/actionpack/lib/action_dispatch/testing/assertions.rb +++ b/actionpack/lib/action_dispatch/testing/assertions.rb @@ -1,8 +1,21 @@ module ActionDispatch module Assertions - %w(response selector tag dom routing model).each do |kind| - require "action_dispatch/testing/assertions/#{kind}" - include const_get("#{kind.camelize}Assertions") + autoload :DomAssertions, 'action_dispatch/testing/assertions/dom' + autoload :ModelAssertions, 'action_dispatch/testing/assertions/model' + autoload :ResponseAssertions, 'action_dispatch/testing/assertions/response' + autoload :RoutingAssertions, 'action_dispatch/testing/assertions/routing' + autoload :SelectorAssertions, 'action_dispatch/testing/assertions/selector' + autoload :TagAssertions, 'action_dispatch/testing/assertions/tag' + + extend ActiveSupport::Concern + + included do + include DomAssertions + include ModelAssertions + include ResponseAssertions + include RoutingAssertions + include SelectorAssertions + include TagAssertions end end end