# 1.9 test woe

**URL:** <https://www.ruby-forum.com/t/1-9-test-woe/172301>\
**Category:** Ruby\
**Created:** [July 18, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301 "2009-07-18T22:14:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 18, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301/1 "2009-07-18T22:14:43Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 22, 2009, 4:07am UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301/2 "2009-07-22T04:07:03Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 23, 2009, 3:30pm UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301/3 "2009-07-23T15:30:10Z")

</div>

> > 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 [GitHub - coatl/sequence: Sequence provides a unified api for access to sequential Ruby data types, like Strings, Arrays, Files, IOs, and Enumerations.](http://github.com/coatl/sequence) unit tests in  
1.9  
I’m working with the author on it, too.  
=r

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 23, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301/4 "2009-07-23T17:58:58Z")

</div>

On 7/23/09, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 [GitHub - coatl/sequence: Sequence provides a unified api for access to sequential Ruby data types, like Strings, Arrays, Files, IOs, and Enumerations.](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.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [July 24, 2009, 1:12am UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301/5 "2009-07-24T01:12:49Z")

</div>

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 [GitHub - coatl/sequence: Sequence provides a unified api for access to sequential Ruby data types, like Strings, Arrays, Files, IOs, and Enumerations.](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.
