I find the debugger helpful to step through the underlying Rails code when I am perplexed about the (errant) operation of something. The underworld is full of wonderful secrets. Plus, I do make mistakes and misinterpret and the debugger lets me take a look around. I try to avoid making bad smells; the debugger is like Harvey Keitel's character in Pulp Fiction.

What about my other questions? Directions on how to write tests when a model has_many or belongs_to? When to mock? Pointers to examples would be the cheap and easy answer -- is there an open source application with rspec tests?

Martin



On Sep 16, 2008, at 3:41 PM, [EMAIL PROTECTED] wrote:

require 'ruby-debug'
debugger

at the point in my code where I want to break into the debugger. Then
running the specs via most any means (including autotest, but not
spec_server) will start up the debugger at that point. Frankly, though, I'll often just stick in some p statements to show some data. Actually, I use
this little function:

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to