From 82e478836f593d481a949381c50e351d4327b5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 15 Jul 2014 14:42:36 -0300 Subject: Use regexp instead exact match for atom test There are two xml namespaces in the response body and the xhtml namespace is not registered in the root node. This create an invalid XML and nokogiri can't navigate using xpath on that node. --- actionview/test/template/atom_feed_helper_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/actionview/test/template/atom_feed_helper_test.rb b/actionview/test/template/atom_feed_helper_test.rb index a2d6b81aad..68b44c4f0d 100644 --- a/actionview/test/template/atom_feed_helper_test.rb +++ b/actionview/test/template/atom_feed_helper_test.rb @@ -315,12 +315,11 @@ class AtomFeedTest < ActionController::TestCase end def test_feed_xhtml - skip "Pending. There are two xml namespaces in the response body, as such Nokogiri doesn't know which one to pick and can't find the elements." with_restful_routing(:scrolls) do get :index, :id => "feed_with_xhtml_content" assert_match %r{xmlns="http://www.w3.org/1999/xhtml"}, @response.body - assert_select "summary div p", :text => "Something Boring" - assert_select "summary div p", :text => "after 2" + assert_select "summary", :text => /Something Boring/ + assert_select "summary", :text => /after 2/ end end -- cgit v1.2.3