Without looking, I would guess that it’s a simple matter of replacing
“require” with “load” somewhere in the GUI code. Using load should probably
be the default anyway. Send it on as a bug to Nathaniel.
I’m planning on doing a lot of test-driven coding soon, so
I’m scoping
out the fastest way to trigger Test::Unit runs as I code. I
got the GTK
GUI going and found that hitting the “Run” button doesn’t reload the
code, it just runs the test again.
Is there an existing test-run GUI that reloads the code at
each test
run a la junit?
I’m planning on doing a lot of test-driven coding soon, so I’m
scoping
out the fastest way to trigger Test::Unit runs as I code. I got the
GTK
GUI going and found that hitting the “Run” button doesn’t reload the
code, it just runs the test again.
Is there an existing test-run GUI that reloads the code at each
test
run a la junit?
John,
Without looking, I would guess that it’s a simple matter of replacing
“require” with “load” somewhere in the GUI code. Using load should
probably
be the default anyway. Send it on as a bug to Nathaniel.
See http://www.ruby-talk.org/36342 for a bit of an explanation of why
this doesn’t exist currently. Short answer: it unfortunately involves a
lot more than just loading instead of requiring.
Have you considered to include gtk2 patch for Test::Unit
written by Kenta MURATA
(muraken2@nifty.com) in your distribution?
I’ve applied it in CVS under rough/lib/testunit - can someone grab it
and make sure both the gtk and gtk2 test runners work? I don’t have
access to either toolkit at the moment.
I fetched the gtk2 module from CVS and here is the result:
ggd@gaura:~/program/ruby/testunit-0.1.8/examples> ruby ts_examples.rb --gtk2
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:294: warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:296: warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:415: warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
ggd@gaura:~/program/ruby/testunit-0.1.8/examples>
I’ve applied it in CVS under rough/lib/testunit - can someone grab it
and make sure both the gtk and gtk2 test runners work? I don’t have
access to either toolkit at the moment.
–
Gour
gour@mail.inet.hr
Registered Linux User #278493
I fetched the gtk2 module from CVS and here is the result:
ggd@gaura:~/program/ruby/testunit-0.1.8/examples> ruby ts_examples.rb
–gtk2
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:294:
warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:296:
warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
/usr/local/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb:415:
warning: rb_f_lambda() is deprecated; use rb_block_proc() instead
ggd@gaura:~/program/ruby/testunit-0.1.8/examples>
Those appear to be warnings caused by the gtk2 extension itself, so
there’s not really anything I can do about them.
Otherwise it works OK.
Great! Were you able to check the regular GTK::TestRunner as well?