diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-15 14:42:36 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-15 14:42:36 -0300 |
commit | 82e478836f593d481a949381c50e351d4327b5ae (patch) | |
tree | 6dbc3a81f763aa2a804150a0d951504f182de537 /actionview/test | |
parent | f5426315d91a0445506a8c56b6f02edde7337507 (diff) | |
download | rails-82e478836f593d481a949381c50e351d4327b5ae.tar.gz rails-82e478836f593d481a949381c50e351d4327b5ae.tar.bz2 rails-82e478836f593d481a949381c50e351d4327b5ae.zip |
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.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/atom_feed_helper_test.rb | 5 |
1 files 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 |