Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception requiring standard library Test::Unit with Minitest v5 #283

Closed
floehopper opened this issue May 8, 2013 · 7 comments
Closed
Assignees

Comments

@floehopper
Copy link

I see the following exceptions when using require 'test/unit' with Minitest v5 in the bundle:

Ruby 2.0.0-p0

undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)

Ruby 1.9.3-p362

uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)

See this simple test project for details on how to reproduce.

I realise this may be an unusual situation, but I ran into it when trying to get the Mocha tests to work and it feels wrong that these exceptions are raised.

I'm just about to try the same thing with the latest version of the test-unit gem to see whether that resolves the problem.

@zenspider
Copy link
Collaborator

test/unit and minitest 5 are not compatible, nor will they be.

ETA: at least, not by my hand.

@ghost ghost assigned zenspider May 9, 2013
@zenspider
Copy link
Collaborator

Haven't heard back. Did you figure it out?

@zenspider
Copy link
Collaborator

This is fixed by specifying that you want the 4 series:

gem "minitest", "~> 4.0"

@floehopper
Copy link
Author

Sorry for slow reply - I've been busy with client work. The fix you suggest won't solve my problem, because I want to use the latest MiniTest. It looks like I'll have to have a closer look at whether I can change the Mocha tests to work a different way.

@eric-smartlove
Copy link

I have the same problem (with ruby 1.9.3) without explicitly requiring test/unit.

I'm just using Rails, and Rails itself requires test/unit, at least in version 3.2.

Does it mean that Rails 3.2 and minitest 5 are incompatible?

@zenspider
Copy link
Collaborator

as said above: "test/unit and minitest 5 are not compatible, nor will they be."

@zenspider
Copy link
Collaborator

ETA: you're welcome to not use test/unit. You can look at minitest-rails or other plugins and use minitest directly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants