aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-10 16:52:00 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-10 16:52:00 -0300
commit3229eda00c2a38526787fddb6cc307cfee5c5ac6 (patch)
tree9b45bf0c52e5b20ab403a5ac0025b9b1b18a5ce3 /actionpack/lib/action_controller/test_case.rb
parent6e76031e8f1f815b390f966cb21e25c66e5ded50 (diff)
parentff1b7e75357eb7797f25aeab33994765130db67f (diff)
downloadrails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.tar.gz
rails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.tar.bz2
rails-3229eda00c2a38526787fddb6cc307cfee5c5ac6.zip
Merge pull request #11218 from kaspth/loofah-integration
Loofah-integration Conflicts: actionpack/CHANGELOG.md actionview/CHANGELOG.md
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index a18c35e3e9..e8c570d68f 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -3,6 +3,9 @@ require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/module/anonymous'
require 'active_support/core_ext/hash/keys'
+require 'loofah'
+require 'rails-dom-testing'
+
module ActionController
module TemplateAssertions
extend ActiveSupport::Concern
@@ -427,6 +430,7 @@ module ActionController
extend ActiveSupport::Concern
include ActionDispatch::TestProcess
include ActiveSupport::Testing::ConstantLookup
+ include Rails::Dom::Testing::Assertions
attr_reader :response, :request
@@ -675,6 +679,11 @@ module ActionController
end
private
+
+ def document_root_element
+ html_document.root
+ end
+
def check_required_ivars
# Sanity check for required instance variables so we can give an
# understandable error message.