Il mio codice in vista èassert_select fallisce con apostrofo (apostrofo) contenuti
<h3 id="account_owner">This is Jhon's account</h3>
La linea di testare questo codice è
assert_select "h3#account_owner", "This is Jhon's account"
test fallisce e dice
"Questo è l'account di Jhon "era previsto ma era Questo è Jhon & # x27; account s '
Inserisco uno spazio tra "& # x27;" perché converte anche in "output di questa domanda". Qualche ipotesi? O come dovrei testare questa linea?
Provare ad aggiungere la codifica '#: UTF-8' alla prima riga del file di test, riferimento: http://stackoverflow.com/questions/20338047/integration-testing-html-special-characters –
@Taiki Tried, ma non ha funzionato. –