aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/abstract_unit.rb3
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb7
2 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 3d61559ee3..99c911c2dd 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -7,4 +7,5 @@ require 'action_controller'
require 'action_controller/test_process'
ActionController::Base.logger = nil
-ActionController::Base.ignore_missing_templates = true \ No newline at end of file
+ActionController::Base.ignore_missing_templates = true
+ActionController::Routing::Routes.reload \ No newline at end of file
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index 4c0382a32c..48d7ed2f3f 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -337,6 +337,13 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
assert_equal "Mr. David", @response.body
end
+ def test_assert_template_xpath_match_no_matches
+ process :hello_xml_world
+ assert_raises Test::Unit::AssertionFailedError do
+ assert_template_xpath_match('/no/such/node/in/document')
+ end
+ end
+
def test_simple_one_element_xpath_match
process :hello_xml_world
assert_template_xpath_match('//title', "Hello World")