From 37249f6a864d6f54cb66168fd2e51b409fb5bc63 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Feb 2005 17:13:57 +0000 Subject: 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 --- actionpack/test/controller/action_pack_assertions_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/controller/action_pack_assertions_test.rb') 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") -- cgit v1.2.3