This project is archived and is in readonly mode.

#1470 ✓wontfix
David Reese

assert_valid undefined in edge ActiveSupport::TestCase

Reported by David Reese | November 25th, 2008 @ 04:44 PM

Running unit tests on edge (2.3) I get NoMethodError: undefined methodassert_valid' for #<OrganizationTest:0x39f9018>

Not sure when that regressed exactly; I'm on cb4968171020bf3bb8f713cd69fe035ee5a3d608.

Comments and changes to this ticket

  • josh

    josh November 25th, 2008 @ 06:07 PM

    • Tag set to autoload
    • Milestone cleared.
    • State changed from “new” to “open”
    • Assigned user set to “josh”

    Guessing an autoloading issue. Let me investigate.

    What files are you requiring? test/unit, active_support/tase_case, etc?

  • josh

    josh November 25th, 2008 @ 06:36 PM

    • State changed from “open” to “wontfix”

    Apparently it was supposed to be deprecated a while ago :)

    Sorry

    http://github.com/rails/rails/co...

  • David Reese

    David Reese November 25th, 2008 @ 07:29 PM

    Thanks... I initially suspected as much but didn't find it anywhere in changelogs or in git logs.

    So i assumed some autoloading was going haywire. Sorry for the noise!

  • David Reese

    David Reese November 25th, 2008 @ 08:46 PM

    On second thought, Joshua -- I think there's still an issue with autoloading. (Seems strange that it would only affect this one assertion.)

    The fix above is fine for functional tests, but in unit tests, assert_valid (still) gives a no method error, not the Deprecation message you'd hope for.

    In 2.2, assert_valid works fine in unit tests, no errors or deprecation messages.

    Since assert_valid is mentioned under 'unit tests' in awdwr2, I'm pretty sure I'm not the only one using it.

  • josh

    josh November 25th, 2008 @ 09:36 PM

    ModelAssertions used to be included directly into Test::Unit but now its only included in ActionController::TestCase.

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>

People watching this ticket

Tags

Pages