1.9 test woe

porting a lib to 1.9, I was presented with this:

somewhere it did a require ‘test/unit’

then later

uninitialized constant Test::Unit::AutoRunner

The fix was:

gem install test-unit
gem ‘test-unit’
require ‘test/unit’

ref:
http://rubyforge.org/pipermail/test-unit-tracker/2008-October/000012.html

However–is this a bug? Does this mean that minitest isn’t totally
compatible?
Thanks.
=r

On Jul 18, 2009, at 13:14, Roger P. wrote:

require ‘test/unit’

ref:
http://rubyforge.org/pipermail/test-unit-tracker/2008-October/000012.html

However–is this a bug? Does this mean that minitest isn’t totally
compatible?

It’s not. The library you’re porting is probably doing something
wrong if it needs AutoRunner. Where is the code?

However–is this a bug? Does this mean that minitest isn’t totally
compatible?

It’s not. The library you’re porting is probably doing something
wrong if it needs AutoRunner. Where is the code?

It came from running the http://github.com/coatl/sequence unit tests in
1.9
I’m working with the author on it, too.
=r

On 7/23/09, Roger P. [email protected] wrote:

However–is this a bug? Does this mean that minitest isn’t totally
compatible?

It’s not. The library you’re porting is probably doing something
wrong if it needs AutoRunner. Where is the code?

It came from running the http://github.com/coatl/sequence unit tests in
1.9
I’m working with the author on it, too.

Using ObjectSpace.each_object on the same line. Definitely a hack.
Sequence inherited that test from its predecessor, cursor, which was
written by someone else. I doubt those tests even work anymore.
(Please take note of the first 2 lines of that file…) I don’t
understand or use them. I kept the old tests around because they
seemed to be doing some very clever things and I hoped to eventually
be able to port them to sequence’s new api… sorry for any
confusion.

On Jul 23, 2009, at 06:31, Roger P. wrote:

However–is this a bug? Does this mean that minitest isn’t totally
compatible?

It’s not. The library you’re porting is probably doing something
wrong if it needs AutoRunner. Where is the code?

It came from running the http://github.com/coatl/sequence unit tests
in
1.9

It looks like the AutoRunner is only needed to set the seed across all
test instances. If you just have a plain setter at the class level
you should be able to ditch all that code.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs