Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

assert_valid undefined in edge ActiveSupport::TestCase

#1470

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.

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

State: wontfix
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • 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?

    November 25th, 2008 @ 06:07 PM

  2. josh
    josh
    • State changed from open to wontfix

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

    Sorry

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

    November 25th, 2008 @ 06:36 PM

  3. David Reese
    David Reese

    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!

    November 25th, 2008 @ 07:29 PM

  4. David Reese
    David Reese

    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.

    November 25th, 2008 @ 08:46 PM

  5. josh
    josh

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

    November 25th, 2008 @ 09:36 PM