A
Anil Gollaa
Hi,
when I run unittest class, with debugger the flow goes into testcase
case class as below.
how can i debug only the testscript instead of going into libraries of
extended clases
Testscript
require "test/unit"
class TestSimpleNumber < Test::Unit::TestCase
def test_simple
assert_equal("abc", "abc" )
end
def test_typecheck
assert_equal("abc", "abc" )
end
def test_failure
assert_equal("abc", "abc" )
end
End
Execution:
C:\ruby>ruby -rubygems -rdebug unittest.rb
Debug.rb
Emacs support available.
unittest.rb:1:require "test/unit"
(rdb:1) b 6
Set breakpoint 1 at unittest.rb:6
(rdb:1) cont
Loaded suite unittest
Started
Breakpoint 1, test_simple at unittest.rb:6
unittest.rb:6: assert_equal("abc", "abc" )
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:85: begin
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:86: teardown
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:94: result.add_run
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:95: yield(FINISHED,
name)
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:47:
notify_listeners(channel, value)
(rdb:1)
Please help me in this regard.
Thanks,
Anil
when I run unittest class, with debugger the flow goes into testcase
case class as below.
how can i debug only the testscript instead of going into libraries of
extended clases
Testscript
require "test/unit"
class TestSimpleNumber < Test::Unit::TestCase
def test_simple
assert_equal("abc", "abc" )
end
def test_typecheck
assert_equal("abc", "abc" )
end
def test_failure
assert_equal("abc", "abc" )
end
End
Execution:
C:\ruby>ruby -rubygems -rdebug unittest.rb
Debug.rb
Emacs support available.
unittest.rb:1:require "test/unit"
(rdb:1) b 6
Set breakpoint 1 at unittest.rb:6
(rdb:1) cont
Loaded suite unittest
Started
Breakpoint 1, test_simple at unittest.rb:6
unittest.rb:6: assert_equal("abc", "abc" )
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:85: begin
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:86: teardown
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:94: result.add_run
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:95: yield(FINISHED,
name)
(rdb:1) n
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:47:
notify_listeners(channel, value)
(rdb:1)
Please help me in this regard.
Thanks,
Anil