I would like to test whether a flash message contains certain text. So I have the line:
assert_select flash[:info], "Your fee is valid till"
DEPRECATION WARNING: The assertion was not run because of an invalid css selector.
unexpected '#' after ''
Only to test the message you don't need
assert would do.
If you wan to test printed HTML then use
assert_select. First argument for
assert_select is a HTML selector, like