拥有如下所示的XML,我如何assert_select
标记atom:link
?
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Title</title>
<link>http://example.com</link>
<description>Description</description>
<atom:link href="http://example.com/feed" rel="self" type="application/rss+xml"/>
</channel>
</rss>
assert_select 'title'
工作正常
assert_select 'atom:link'
输出Expected at least 1 element matching "atom:link", found 0..
。
我正在使用Rails 4.2.0