The combination of Corey Haines' code retreat and the RSpec book have got me 
far more confident with how to spec things lately. The book is definitely worth 
a read.

(I didn't get to the recent code retreat sadly).

-- 
Pat


On 02/09/2011, at 6:40 PM, Mikel Lindsaar <[email protected]> wrote:

> On 02/09/2011, at 4:07 PM, Michael Gall wrote:
>> Thanks for the feedback guys. I suppose the Pat's second approach and 
>> Mikel's approach are similar in that they are using an array and a loop to 
>> manage the variations.
>> 
>> The thing that they don't really do is kind of explain the actual formula 
>> taken to derive the data, which I feel (perhaps unfoundedly) that they 
>> should. Nonetheless, they will ensure that the output of the function is 
>> correct.
> 
> And that is the point of both Pat's and my solution.
> 
> RSpec is about testing behaviour.
> 
> How that behaviour is generated behind the scenes is totally irrelevant and 
> should be kept that way.
> 
> Good book to get is the RSpec book from the pragmatic programmers.  Well 
> worth the read if you haven't done so yet.
> 
> A good online example is the RSpec Master Mind 
> (http://blog.daveastels.com/files/mastermind-ruby.pdf) it is quite old now (a 
> few years) but it is still valid in teaching the thought process.
> 
> 
> Regards
> 
> 
> Mikel Lindsaar
> http://rubyx.com/
> http://lindsaar.net/
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rails-oceania?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to