------ art_13563_6941810.1132677348920 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Or, you could simply use the breakpoint library... Catch your own failure and drop yourself to an IRB session... j. On 11/21/05, nobuyoshi nakada <nobuyoshi.nakada / ge.com> wrote: > > Hi, > > At Tue, 22 Nov 2005 16:12:24 +0900, > listrecv / gmail.com wrote in [ruby-talk:166936]: > > When a unit test fails, automatically raise the debugger. > > > > Implementation should be simple - instead of just throwing errors on > > failed assertions, do a require 'debug.rb'; raise (the exception again) > > > > One issue I have is that this will be annoying for TDD, when we expect > > tests to fail. So there needs to be some type of switch (envariable, > > command line, etc.) > > Create autodebug.rb like as: > module Kernel > alias _raise raise > def raise(*a) > require "debug" > _raise(*a) > end > end > > then > > $ ruby -rautodebug test_foo.rb > > or > > $ RUBYOPT=rautodebug testrb foo # for directories > > -- > Nobu Nakada > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood ------ art_13563_6941810.1132677348920--