I didn't found a valid answer, but to test that line i do something like
assert_select "h3#account_owner", "This is Jhon's account".gsub("\'", '&# x27;')
Again, I put a space between "&# x27;" because it also converts into ' on output of this answer. I am still looking for better way to test this.