[rspec-users] Possible to ask rspec to show more code in the debugger?

Rick DeNatale rick.denatale at gmail.com
Thu Feb 3 15:42:54 EST 2011


On Thu, Feb 3, 2011 at 1:40 PM, David Kahn <dk at structuralartistry.com> wrote:
> This came up from an other issue where I needed to go check something in
> test::unit. Immediately when I dropped into the debugger in test::unit I saw
> something I have been missing: test unit by default shows a number of lines
> of code. Is there a way to make the rspec debugger do this?
>
> I am not sure if it is just me, but seems to me that when I moved to rspec,
> certain things which seemed to be nice default behaviors in test::unit are
> no longer default. For example this issue, and also that it seems that rspec
> does not automatically 'set autoeval' when going into the debugger. Not deal
> breakers by any means but thought I would see if anyone else has the same
> comments.
>
>
> Loaded suite test/unit/random_test
> Started
> [4, 13] in test/unit/random_test.rb
>    4
>    5    def test_this_hahahah
>    6      a = 1
>    7      a += 1
>    8      debugger
> => 9      assert a == 2
>    10    end
>    11
>    12
>    13  end
> test/unit/random_test.rb:9
> assert a == 2
> (rdb:1)

both of these are set by the .rdebugrc file in your home directory

set listsize 12

in that file should set the default number of lines for the list
command to show,

perhaps that file changed.

-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale


More information about the rspec-users mailing list