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.

default_test errors in 2.3 RC1

#1841

I think I might've found a bug with Rails 2.3 RC1. Creating a new project, there's 5 tests that fail automatically. Not sure if this is a mocha problem or rails, but I'm going to post it here first:

http://gist.github.com/56719

If mocha has a mailing-list, bug tracker, I can report it there too.

Reported by invalidusrname · February 2nd, 2009 @ 01:53 AM

State: resolved
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. invalidusrname
    invalidusrname

    This seems to only be happening on OSX for me. I've tried the same commands on an ubuntu machine and a dreamhost account and they don't have this error.

    I'm using ruby 1.8.7 from macports, if that helps.

    February 4th, 2009 @ 03:27 AM

  2. DHH
    DHH
    • Assigned user set to Jeremy Kemper
    • Milestone cleared.

    February 6th, 2009 @ 02:03 PM

  3. Dan Croak
    Dan Croak

    I'm seeing the same error. Notice that there is one failure each of:

    • ActionController::TestCase
    • ActionMailer::TestCase
    • ActionView::TestCase
    • ActiveRecord::TestCase
    • ActiveSupport::TestCase

    I'm also on OS X, also including mocha. I'm using Ruby 1.8.6.

    February 9th, 2009 @ 07:30 PM

  4. Dan Croak
    Dan Croak

    I removed mocha from the app and still see the failures.

    February 9th, 2009 @ 07:45 PM

  5. Jeremy Kemper
    Jeremy Kemper

    I haven't been able to duplicate this.

    February 22nd, 2009 @ 06:53 PM

  6. Dan Croak
    Dan Croak

    I uninstalled mocha from my local machine and the tests ran correctly.

    sudo gem uninstall mocha Password:

    Select gem to uninstall: 1. mocha-0.9.1 2. mocha-0.9.3 3. All versions

    3 Successfully uninstalled mocha-0.9.1 Successfully uninstalled mocha-0.9.3

    Is rake picking up something in Rails' tests itself? It's weird that it would try to bring mocha into the mix at all.

    February 27th, 2009 @ 09:09 PM

  7. invalidusrname
    invalidusrname

    You're right Dan. I also uninstalled mocha and was able to get the tests to pass.

    Does this mean that Rails has mocha bundled now? I'm a little confused because the release notes say that mocha is required for rails core to test.

    February 27th, 2009 @ 09:16 PM

  8. Eloy Duran
    Eloy Duran

    I recently heard of some strange behaviour if minitest is installed as well. Would that be the case for you guys?

    February 28th, 2009 @ 12:20 PM

  9. Dan Croak
    Dan Croak

    Hey Eloy,

    I do have minitest (1.3.0) installed on my machine. I'm guessing mocha was the offender, though. With mocha and minitest installed: failures. With just minitest installed: no failures.

    March 1st, 2009 @ 04:39 PM

  10. Eloy Duran
    Eloy Duran

    Hey Dan,

    Yup, it's mocha. What I meant was that mocha behaves weird in the presence of minitest. So could you tun the test around? So remove minitest and install mocha and see if the tests run?

    March 1st, 2009 @ 09:40 PM

  11. Dan Croak
    Dan Croak

    Hi Eloy,

    I just turned the experiment around. With minitest uninstalled and mocha installed, the tests also run without the default_test errors.

    Dan

    March 2nd, 2009 @ 03:40 PM

  12. Eloy Duran
    Eloy Duran

    Ok, so the problem is indeed with mocha when miniunit is installed. There has been some work done on this, I believe, at: http://github.com/floehopper/moc...

    March 2nd, 2009 @ 03:47 PM

  13. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to hold

    Thanks for tracking this down. There are quite a few permutations of ruby, test-unit, mocha, and minitest at play.

    March 2nd, 2009 @ 04:13 PM

  14. Eloy Duran
    Eloy Duran

    This commit should make sure minitest isn't loaded when using mocha: http://github.com/floehopper/moc...

    March 4th, 2009 @ 07:40 PM

  15. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from hold to resolved

    August 3rd, 2009 @ 02:29 PM