This project is archived and is in readonly mode.

#119 ✓invalid
Nathan Wilmes

Add basic assertions to core_ext

Reported by Nathan Wilmes | May 6th, 2008 @ 12:54 AM

The following patch defines a bunch of convenience assertions for general testing purposes. We've got assert_contains, assert_does_not_contain, assert_empty, assert_false/true (aliases), assert_array_contents_match, assert_includes (alias), assert_does_not_include (alias), and assert_not_contains (alias)

Comments and changes to this ticket

  • DHH

    DHH May 6th, 2008 @ 08:57 PM

    • State changed from “new” to “invalid”

    We used to have a very full-fledged set of assets, but cut them down because the value they offered wasn't worth the hassle of trying to figure out when to use what. assert array.empty?, "shouldn't be empty" works just as well as assert_empty, imo.

  • Ryan Bigg

    Ryan Bigg October 11th, 2010 @ 10:58 AM

    • Tag cleared.
    • Importance changed from “” to “Low”

    Automatic cleanup of spam.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages