Assert_select_rjs testing question

I’m using assert_select_rjs for testing my RJS code.
If my RJS code is:

page.replace_html “errors”,
” + @item.errors.full_messages.to_s + “

I know that I can test it like so:

assert_select_rjs :replace_html, “errors” do
assert_select “span”, “Error happened”
end

The question I have, is there any way to verify the error text without
wrapping it in the tag? It just would be much cleaner in my .rjs
file if I didn’t have to do that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs