[rspec-users] debugger in controller in rspec

2011-02-07 Thread Martin Streicher
I placed a debugger statement in a controller being tested with rspec2 to catch what's going on, but the statement is ignored? Do I have to do anything special to get the debugger to stop in the controller under rspec? If I place the debugger statement in the spec, I get a break -- but I want the b

[rspec-users] TextMate and RSpec

2008-09-24 Thread Martin Streicher
produces a fail, however, because the data in tables remain. This is somewhat inconsistent, too. Running it twice produces a pass. Any ideas? How can I ensure that the database -- or at least the tables for the two models -- is empty? -- Martin Streicher Fresh Pixels and Bytes (and now Commas

[rspec-users] rspec tests and acts_as_solr models

2008-09-23 Thread Martin Streicher
I would like to use rspec to test a model that leverages acts_as_solr. I think I want to render rebuild_solr_index and solr_commit and perhaps other methods that call out to the Solr server moot by having those functions simply return true. (I will build other tests to make sure my Solr c

Re: [rspec-users] Newbies are people too

2008-09-18 Thread Martin Streicher
Thanks, Scott. I tend to want to run the real thing to make sure the code really does work. On Sep 17, 2008, at 10:59 AM, [EMAIL PROTECTED] wrote: Ultimately, it's all about how comfortable you feel. Mocks will always smell bad with rails' associations because of the law of demeter violat

Re: [rspec-users] Newbiness

2008-09-17 Thread Martin Streicher
Hey, James. Nice to hear from you. If you hear of any work, send it my way. I did watch the PeepCode stuff. I will watch it again now that I have a little experience with the whole thing -- perhaps it will fill in some blanks. On Sep 17, 2008, at 2:13 PM, [EMAIL PROTECTED] wrote: it'

Re: [rspec-users] The distinctive smell of newbiness

2008-09-17 Thread Martin Streicher
The heart of my question is the seemingly chicken-and-egg-like nature of testing many models that work together. I now have two flavors of tests: tests that keep the models honest (computations and returns values are consistent and accurate) and tests that operate at the macro level as yo

Re: [rspec-users] Prepare for newbie-ness

2008-09-17 Thread Martin Streicher
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 ba

[rspec-users] Prepare for newbie-ness

2008-09-16 Thread Martin Streicher
A few questions from someone new to rspec. 1/ I have several complex yet largely independent models using rspec to test internals and computation methods. I am about to tackle models that have several ties to each other and to the "primitive", independent models. One model has stuff like