私は私の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">.
どうすれば修正できますか?