[Rails] Re: stupid question about BDD

2009-12-03 Thread Bzouchir
I got it as wrong as you did. until I grabbed a copy of The RSpec book from the Pragmatic bookshelf http://pragprog.com/titles/achbd/the-rspec-book It's the best insight into the workflow and practices, I thought I got it all until i read this book (still reading...) It's worth it mate,

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread Colin Law
2009/12/3 Edward Middleton emiddle...@bebear.net: Satyajit Malugu wrote: Hassan Schroeder wrote:     sax  wrote:     No, you should complement BDD with unit tests of some sort.     Why? What does a unit test do that an RSpec test of your models     doesn't? About this topic from the

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread Rick DeNatale
On Thu, Dec 3, 2009 at 4:20 AM, Colin Law clan...@googlemail.com wrote: That all depends on ones definition of a unit test of course.  I think of a unit test as something that tests the model or other low level component of an application (ie a unit).  I believe the term originally arose

[Rails] Re: stupid question about BDD

2009-12-03 Thread byrnejb
On Dec 2, 12:52 pm, Christoph Jasinski christoph.jasin...@googlemail.com wrote: Hi, I'm divin' into BDD with RSpec, Cucumber Friends and wanted to know whether I got it right. When I go for BDD I skip unit tests? Is that right or am I wrong? Neither. It depends on your workflow, the

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread s.ross
On Dec 3, 2009, at 1:20 AM, Colin Law wrote: 2009/12/3 Edward Middleton emiddle...@bebear.net: Satyajit Malugu wrote: Hassan Schroeder wrote: sax wrote: No, you should complement BDD with unit tests of some sort. Why? What does a unit test do that an RSpec test of your

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread Colin Law
2009/12/3 s.ross cwdi...@gmail.com: ... I would suggest that it is not necessarily desirable to test every method in a model. Rather, it is desirable to test whether your model does what it is supposed to do -- irrespective of the methods used to achieve that end. This makes the refactor of

[Rails] Re: stupid question about BDD

2009-12-03 Thread sax
Even if, from a high level, your feature uncovers the fact that there's a problem, a thorough set of specs testing specific low-level behaviors can tell you exactly where that problem lies. Five minutes of spec writing can save me an hour of troubleshooting. I'm still pretty new to TDD, but the

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread Hassan Schroeder
On Thu, Dec 3, 2009 at 9:36 AM, Colin Law clan...@googlemail.com wrote: I disagree, not in the principle that a model should 'behave' as specified, but whether this can always easily be ensured by top level behavioural analysis. Sometimes special cases that should be tested are much more

Re: [Rails] Re: stupid question about BDD

2009-12-03 Thread Christoph Jasinski
After so many rich and deep replies I watched grandmaster test aka Bryan Liles video TATFT: 'The Layman's Guide ( http://aac2009.confreaks.com/07-feb-2009-13-30-tatft-the-laymans-guide-bryan-liles.html) again and it not only reminded me to test all the * time but also to go for RSpec, Cucumber and

[Rails] Re: stupid question about BDD

2009-12-02 Thread sax
No, you should complement BDD with unit tests of some sort. On Dec 2, 9:52 am, Christoph Jasinski christoph.jasin...@googlemail.com wrote: Hi, I'm divin' into BDD with RSpec, Cucumber Friends and wanted to know whether I got it right. When I go for BDD I skip unit tests? Is that right or am

[Rails] Re: stupid question about BDD

2009-12-02 Thread E. Litwin
Unit tests at the model level are very helpful and important IMO. I tend to have very light unit tests on my views and fairly light on my controllers since since the bulk of the code is in models (and Cucumber tests the view/controller pretty well.) On Dec 2, 10:54 am, sax

[Rails] Re: stupid question about BDD

2009-12-02 Thread sax
Random thought, but if they're using RSpec for unit testing then the test folder would be redundant (everything would go into spec/). On Dec 2, 11:58 am, Christoph Jasinski christoph.jasin...@googlemail.com wrote: Thanks for the replies. I fired that question cause I bought a bunch of

Re: [Rails] Re: stupid question about BDD

2009-12-02 Thread Hassan Schroeder
On Wed, Dec 2, 2009 at 10:54 AM, sax s...@livinginthepast.org wrote: No, you should complement BDD with unit tests of some sort. Why? What does a unit test do that an RSpec test of your models doesn't? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan --

Re: [Rails] Re: stupid question about BDD

2009-12-02 Thread Satyajit Malugu
About this topic from the author of the book - http://blog.davidchelimsky.net/2009/02/02/rspec-works-with-test-unit/* *Thanks to Shannon on vark.com for pointing me towards this. On Wed, Dec 2, 2009 at 1:53 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Wed, Dec 2, 2009 at 10:54

Re: [Rails] Re: stupid question about BDD

2009-12-02 Thread Edward Middleton
Satyajit Malugu wrote: Hassan Schroeder wrote: sax wrote: No, you should complement BDD with unit tests of some sort. Why? What does a unit test do that an RSpec test of your models doesn't? About this topic from the author of the book -