Re: weirdness with ruby unit testing on mac
- From: "Chris Carter" <cdcarter@xxxxxxxxx>
- Date: Sat, 14 Jul 2007 23:23:25 +0900
On 7/14/07, David Carlton <carlton@xxxxxxxxxxxx> wrote:
I have a ruby project that I've written in a Linux environment. (Ruby
1.8.5, on Ubuntu.) I'd like to work on it on my Mac (Ruby 1.8.2, OSX
10.4) while I'm on vacation, and something weird is happening with my
tests.
The project lives in a directory 'dbcdb' of my $RUBYLIB; there's a
subdirectory 'test', with a file 'all.rb' containing lines like this:
require 'dbcdb/test/test_author_printer'
require 'dbcdb/test/test_author_writer'
require 'dbcdb/test/test_book_writer'
Each of those test files defines a suite.
On the Linux box, if I do
ruby -e "require 'dbcdb/test/all'"
it runs all of them:
panini$ ruby -e "require 'dbcdb/test/all'"
Loaded suite -e
Started
......................................................................................................
Finished in 0.083742 seconds.
102 tests, 384 assertions, 0 failures, 0 errors
On the Mac, though, it does this:
truffle:~ carlton$ ruby -e "require 'dbcdb/test/all'"
Loaded suite .
Started
Finished in 0.000213 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
If I try to run one of the test files, it claims to run some tests:
truffle:~ carlton$ ruby -e "require 'dbcdb/test/test_author_printer'"
Loaded suite .
Started
....................................................................................................
Finished in 0.040504 seconds.
100 tests, 383 assertions, 0 failures, 0 errors
but that's equally bizarre since test_author_printer doesn't contain
100 tests.
What's going on here? Is there some difference between 1.8.2 and
1.8.5 that I'm unaware of, or something weird about the Mac ruby
installation, or what? If it's not something well-known, what's the
best way to debug the problem?
Thanks,
David Carlton
carlton@xxxxxxxxxxxx
First of all, you should be doing:
ruby dbcdb/test/all.rb
Not your wacky thing with -e and require. Dunno if that will fix it,
but it is standard practice this way.
--
Chris Carter
concentrationstudios.com
brynmawrcs.com
.
- Follow-Ups:
- Re: weirdness with ruby unit testing on mac
- From: David Carlton
- Re: weirdness with ruby unit testing on mac
- References:
- weirdness with ruby unit testing on mac
- From: David Carlton
- weirdness with ruby unit testing on mac
- Prev by Date: Re: I need serious help!
- Next by Date: Re: Web Databases and Objects
- Previous by thread: weirdness with ruby unit testing on mac
- Next by thread: Re: weirdness with ruby unit testing on mac
- Index(es):
Relevant Pages
|