More problems with Rake/Test::Unit

It looks like the behavior of the 'testrb' command has changed which
is causing Rake to no longer work with Test::Unit when trying to add
options such as "--runner=gtk2".

Apparently, you used to have to call testrb as follows:

    testrb /path/to/test/case -- --runner=gtk2

(at least, that's the impression I got from the Rake docs.)

This will produce a LoadError as Test::Unit tries to load the file '--
--runner=gtk2'.

Changing the call to this:

    testrb /path/to/test/case --runner=gtk2

seems to work just fine.

Here's the simple patch against testtask.rb to get it working again
(not _thoroughly_ tested, YMMV):

    89c89
    < testoptions = " -- #{get_options}"

···

---
    > testoptions = " #{get_options}"

--
Regards,
John Wilger

-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland

John Wilger said:

It looks like the behavior of the 'testrb' command has changed which
is causing Rake to no longer work with Test::Unit when trying to add
options such as "--runner=gtk2".

Thanks John. David Heinemeier Hansson mentioned this to me this morning
in IM. Looks like we will have another quick Rake release this evening.

Someone else sent some patches to fix some warning messages as well. I
think I will continue to make quick releases of Rake in the 0.4.xx series
as patches come in. When it looks like we have a stable version working
with Ruby 1.8.2, I'll make a Rake-0.5.0 release.

Thanks to everyone on their feedback.

···

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

Is this not perhaps something that could be better handled by
in-lining the testing as I am doing in the rakefiles on my projects
now? I think I sent you this info, Jim. Let me know if I didn't, and
I'll point it out ASAP; I'm quite happy with the way that tests are
run on my projects, and if it could be made a Task instead, I'd be
even happier (especially if said task interacted with the RubyGems
task).

-austin

···

On Tue, 4 Jan 2005 04:41:22 +0900, Jim Weirich <jim@weirichhouse.org> wrote:

John Wilger said:
> It looks like the behavior of the 'testrb' command has changed which
> is causing Rake to no longer work with Test::Unit when trying to add
> options such as "--runner=gtk2".

Thanks John. David Heinemeier Hansson mentioned this to me this morning
in IM. Looks like we will have another quick Rake release this evening.

Someone else sent some patches to fix some warning messages as well. I
think I will continue to make quick releases of Rake in the 0.4.xx series
as patches come in. When it looks like we have a stable version working
with Ruby 1.8.2, I'll make a Rake-0.5.0 release.

Thanks to everyone on their feedback.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Austin Ziegler said:

Is this not perhaps something that could be better handled by
in-lining the testing as I am doing in the rakefiles on my projects
now?

Generally I try to run the tests with as little extra software loaded as
possible, particularly when I test Rake itself. I might be using my
installed version of Rake to run tests on a developement version of Rake.
Under that scenario, the tests are better run out of process.

But in-process tests would probably be fine for most projects, especially
since the rake process itself is rather short-lived. Do you find they run
faster in-process? if there is interest, providing an in-process Rake
test task might be worthwhile.

Thanks for reminding me of this option, I had forgotten about the code you
sent me.

···

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

I don't know if it's faster or not. I just know that Rake doesn't do
quite as well on a number of things with Windows as I would like, and
I've had to tweak a lot of things; this testing mechanism is because
the initial test task did not work for me on Windows; since then, I
have simply continued to use what I have because I already have to
load my code for what I do (I always get the version number of the
software from the software itself).

-austin

···

On Tue, 4 Jan 2005 07:02:10 +0900, Jim Weirich <jim@weirichhouse.org> wrote:

Austin Ziegler said:
> Is this not perhaps something that could be better handled by
> in-lining the testing as I am doing in the rakefiles on my projects
> now?
Generally I try to run the tests with as little extra software loaded as
possible, particularly when I test Rake itself. I might be using my
installed version of Rake to run tests on a developement version of Rake.
Under that scenario, the tests are better run out of process.

But in-process tests would probably be fine for most projects, especially
since the rake process itself is rather short-lived. Do you find they run
faster in-process? if there is interest, providing an in-process Rake
test task might be worthwhile.

Thanks for reminding me of this option, I had forgotten about the code you
sent me.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca