标签: ruby-on-rails
' assert_tag'方法已弃用。 如何仅使用assert_select重构此规范?
assert_no_tag :tag => 'p', :content => /Are you sure you want to delete this user/
答案 0 :(得分:2)
您希望断言与文本匹配的选择器将返回一个空数组:
assert_select "p", text: /Are you sure/, count: 0