This is no biggie but just wanted to points out
a difference between RUnit and Test::Unit that I find a bit annoying
In the latter I can’t seem to do
ruby -r debug test_case.rb
then set a breakpoint in a test method in a TestCase in test_case.rb and
the let it run up to the breakpoint. If I don’t remember incorrectly
RUnit had no troubles with this?
Or have I missed something?
Its no biggie but just wanted to point that out.
Thanks to Nathaniel and others working on unit testing frameworks,
b.rb:2:require 'test/unit'
(rdb:1) l
[-3, 6] in b.rb
1
=> 2 require 'test/unit'
3
4 class A < Test::Unit::TestCase
5 def test_aa
6 puts "aa"
(rdb:1) b 6
Set breakpoint 1 at b.rb:6
(rdb:1) c
Loaded suite b
Started
Breakpoint 1, test_aa at b.rb:6
b.rb:6: puts "aa"
(rdb:1) c
aa
.
Finished in 1.95283 seconds.
and second to latest Test::Unit. Hmm, seems I draw some erroneous
conclusions there, seems I can’t set any breakpoints at all. I thought it
had something to do with Test::Unit.
I’ll update to latest versions and see if that’ll fix it.
and second to latest Test::Unit. Hmm, seems I draw some erroneous
conclusions there, seems I can't set any breakpoints at all. I thought it
had something to do with Test::Unit.
Well, I've this in unit.rb
at_exit {
# We can't debug tests run with at_exit unless we add the following:
set_trace_func DEBUGGER__.context.method(:trace_func).to_proc if (defined? DEBUGGER__)
test/test_tree.rb:1:require ‘test/unit’
(rdb:1) b 67
Set breakpoint 1 at test_tree.rb:67
(rdb:1) c
Loaded suite test/test_tree
Started
…
Finished in 0.735 seconds.
6 tests, 27 assertions, 0 failures, 0 errors
Regards,
Robert Feldt
···
On Sat, 8 Mar 2003, ts wrote:
and second to latest Test::Unit. Hmm, seems I draw some erroneous
conclusions there, seems I can’t set any breakpoints at all. I thought it
had something to do with Test::Unit.
Well, I’ve this in unit.rb
at_exit {
We can’t debug tests run with at_exit unless we add the following:
set_trace_func DEBUGGER__.context.method(:trace_func).to_proc if (defined? DEBUGGER__)