answer.js.erb that contained the following:
and I wanted to take apart the HTML returned by that
render :partial section.
I eventually came up with a solution that I’m happy with, so I’ll mention it here in case anybody else runs into the same problem and ends up here via Googling.
The partial in question contained a
p element with class
qa; let’s assume that it’s body is supposed to be
text_to_assert_on. Then here’s the test that I ended up with:
I don’t claim that this is perfect (there are probably more cases that
This post has not been revised since publication.