Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed AD assertion autoloads [#3470 state:resolved]
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |