More problems with Rake/Test::Unit

J

John Wilger

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
 
J

Jim Weirich

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.
 
A

Austin Ziegler

John Wilger said:

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.

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
 
J

Jim Weirich

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.
 
A

Austin Ziegler

Austin Ziegler said:
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top