Assert_select alternative

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 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