我想测试一下flash消息是否包含某些文本.所以我有这条线:
assert_select flash[:info], "Your fee is valid till"
然而,这失败并显示错误消息:
DEPRECATION WARNING: The assertion was not run because of an invalid css selector. unexpected '#' after ''
有谁知道我做错了什么?
试试这个.
assert_equal "Your fee is valid till", flash[:info]
要么
assert_select 'div.alert-info', flash[:info]