我的 html 代码中有这个字符串:
1\n \n word
我想做一个忽略那些新行和空格的 assert_select ,所以我尝试了这个:
assert_select ".myclass", /1.+word/
但它不起作用:
1) Failure:
test_new_line(NewLineControllerTest) [test/functional/new_line_controller_test.rb:23]:
</1.+word/> expected but was
<"1\n \n word">.
我该如何解决?