1. Sep 4th, 2006

    assert_select cheat sheet

    assert_select.png

    Jog your memory when writing functional tests.

    Download the HTML, PDF or if you’re using cheat: cheat assert_select.

    1. Sep 4th, 2006

      Labnotes » assert_select plugin for Rails

      [...] Update 3: assert_select is now part of Rails core. Also, cheat sheet available here. [...]

    2. Nov 26th, 2006

      Balance On Rails : Rails 1.2 RC1: Novidades em ActiveRecord, Action Pack e Active Support

      [...] Adicionado a regra assert_select para testes de seletores baseados em CSS (cheat sheet). Use isso em vez de assert_tag a partir de agora. [...]

    3. Jan 22nd, 2007

      Laurel Fan

      Thanks for the cheat sheet! You might want to add the :html equality test option. It’s similar to the :text equality test, but matches html (see http://blog.gorgorg.org/articles/2007/01/22/assert_select-lets-you-specify-the-html-content-of-a-tag).

    4. Feb 14th, 2007

      Rails 1.2.1 Impression - Push cx

      [...] rebuilt the assertion to use CSS3 selectors (with a few clever additions). Suddently the code is simpler, more idiomatic, and more featureful. And that’s just what [...]

    5. Feb 19th, 2007

      Undefine method assert_select

      [...] assert_select method for tests was added in Rails 1.2, so the first thing to check if you’re getting the [...]

    6. Apr 23rd, 2007

      assert_select cheat sheet at random

      [...] Voor de Railzers onder ons, er is een “cheat sheet” voor assert_select. Assert_select laat je toe de responses van je applicatie te testen op de inhoud (er moet een “div” zijn, er moet een “title” zijn, maar ook “er moet een div met daarin 2 tables, zijn, met een row in de tweede table die als Id xxx heeft, en inhoud yyy”). Zie deze link. [...]

    7. May 31st, 2007

      SR

      Great Work! I’ve added it to http://TechCheatSheets.com

    8. Nov 22nd, 2007

      Labnotes » Rounded Corners - 168 (Happy Thanksgiving)

      [...] Test this. Engtech pointed me to Agile Web Development Rails (2nd ed) which mentions me by name. That makes me half as proud as the context in which it appears: TDD with assert_select. [...]

    9. Mar 24th, 2008

      Coffee, Code and Candor » Blog Archive » Asserting a Rails controller response doesn’t contain certain content

      [...] out this is easy (I should have known).  I found the answer on this Cheat Sheet.  The assert_select test helper accepts an equality? parameter, so give it false and it ensures [...]

    Your comment, here ⇓

    Or using OpenID