aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 17:13:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 17:13:57 +0000
commit37249f6a864d6f54cb66168fd2e51b409fb5bc63 (patch)
treedbc1f788d61b15d2aa00fca2b841e3dca9d616b7 /actionpack/test
parent5fc48bc54fc82f350ab4838ca3cc0eff158225fc (diff)
downloadrails-37249f6a864d6f54cb66168fd2e51b409fb5bc63.tar.gz
rails-37249f6a864d6f54cb66168fd2e51b409fb5bc63.tar.bz2
rails-37249f6a864d6f54cb66168fd2e51b409fb5bc63.zip
Fixed that assert_template_xpath_matches did not indicate when a path was not found #658 [Eric Hodel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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")