[英]How to test content with assert_select
不推荐使用'assert_tag'方法。 如何仅使用assert_select重构此规范?
assert_no_tag :tag => 'p', :content => /Are you sure you want to delete this user/
您要断言与文本匹配的选择器将返回一个空数组:
assert_select "p", text: /Are you sure/, count: 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.