When assert_select fails because the counts are off you get messages like:
Expected at least 1 elements, found 0
You aren't told what kind of element AND you're told "1 elements" when it could be "1 element".
This patch will result in this message instead:
Expected at least 1 element matching "div", found 0
Also, if the selection criteria includes a range, the message would read:
Expected between 3 and 4 elements matching "p", found 2
I started w/ "Expected at least 1 <div> tag, found 0", but that became too complex as the selection criteria got more complex. This solution works the same regardless of the complexity of the selector.
I see that ticket 6623 deals with the selector criteria, but this patch also deals with the counts and element vs elements.
This patch also patches assert_select_test with the new expected messages.