# Setup.rb test

**URL:** <https://www.ruby-forum.com/t/setup-rb-test/72665>\
**Category:** Ruby\
**Created:** [October 18, 2006, 10:40am UTC](https://www.ruby-forum.com/t/setup-rb-test/72665 "2006-10-18T10:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar-alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e36b37/32.png) [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Post date:** [October 18, 2006, 10:40am UTC](https://www.ruby-forum.com/t/setup-rb-test/72665/1 "2006-10-18T10:40:11Z")

</div>

Hi,

I seem to be having a Friday afternoon brain-fade. I’m trying to get  
setup.rb to run some TestCases, but nothing seems to work. I thought  
that placing my tests in the ‘test’ directory was all that was  
required but setup.rb never seems to find the tests. Can anyone see  
what I’m doing wrong in this toy example?

/tmp(72): ls  
setup.rb test  
/tmp(73): ls test/  
test.rb  
/tmp(74): ruby setup.rb test  
Running tests…  
Loaded suite test  
Started

Finished in 0.002258 seconds.

0 tests, 0 assertions, 0 failures, 0 errors  
/tmp(75): cd test/  
/tmp/test(76): ruby test.rb  
Loaded suite test  
Started  
Testing?  
.  
Finished in 0.004409 seconds.

1 tests, 0 assertions, 0 failures, 0 errors  
/tmp/test(77): cat test.rb  
require ‘test/unit’  
class TestTest \< Test::Unit::TestCase

def test\_me  
puts “Testing?”  
end  
end

Dr Alex G.  
Post-Doctoral Researcher

Bioinformatics Center  
Institute for Chemical Research  
Kyoto University  
Gokasho, Uji, Kyoto 611-0011  
Japan

---

<div class="post-metadata">

**Author:** ![oscar-alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e36b37/32.png) [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Post date:** [October 18, 2006, 10:41am UTC](https://www.ruby-forum.com/t/setup-rb-test/72665/2 "2006-10-18T10:41:00Z")

</div>

Alex G. wrote:

> /tmp(73): ls test/  
> /tmp/test(76): ruby test.rb  
> Loaded suite test  
> Started  
> Testing?

You’re using Test::Unit::TestCase in test.rb? If we could see a snip of  
you test.rb file, that might help.

---

<div class="post-metadata">

**Author:** ![oscar-alexander](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e36b37/32.png) [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Post date:** [October 18, 2006, 10:44am UTC](https://www.ruby-forum.com/t/setup-rb-test/72665/3 "2006-10-18T10:44:07Z")

</div>

Trans wrote:

> > setup.rb test  
> > /tmp(75): cd test/  
> > /tmp/test(76): ruby test.rb  
> > Loaded suite test  
> > Started  
> > Testing?
> 
> You’re using Test::Unit::TestCase in test.rb? If we could see a snip of  
> you test.rb file, that might help.

Strange, I had included test.rb, but the newsgroup gateway seemed to  
snip my email halfway. test.rb looks like this:

/tmp/test(77): cat test.rb  
require ‘test/unit’  
class TestTest \< Test::Unit::TestCase

def test\_me  
puts “Testing?”  
end  
end

It’s using Test::Unit::TestCase and seems to run fine when run manually  
since the ‘Testing?’ string gets printed (see above). But it doesn’t  
get run by setup.rb for some reason…

Alex G.
