Forum: Ruby on Rails assert_select alternative

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Yehuda K. (Guest)
on 2007-01-28 18:33
Hey guys,

I was having issues with some of the way assert_select worked, so I
wrote an alternative to assert_select using hpricot.

The major differences:
* You get full support for CSS3 and limited XPath
* It uses hpricot, which is fast; plus you get improvements to hpricot
  free in assert_elements as long as you update the gem.
* Blocks work a bit differently (assert_elements tests whether any
  elements passes all of the assert_elements inside the
  tests whether the assert_selects in the block are true for the list of
  matched elements). I felt as though this was the more intuitive
  and you can read my reasoning on my blog.

You can read  about it at
This topic is locked and can not be replied to.