[rspec-users] Four Question From an RSpec Baby - Give me something to chew

Matt Wynne matt at mattwynne.net
Thu Aug 28 02:54:15 EDT 2008

On 28 Aug 2008, at 04:46, Scott Taylor wrote:
> Especially regressions.  Usually you can get in a few extra specs  
> when writing a regression that has nothing to do with the bug  
> itself (it's a sort of testing after the fact - almost like proving  
> theorems of an existing system).

The Feathers book talks about writing tests in this situation almost  
the way a scientist might perform experiments on a mysterious  
chemical to try and determine its properties - writing tests to  
validate the assumptions you're making about the behaviour of the  
class as you read the code and try to understand it. Writing  
executable specs as you do this obviously leaves your team a lot  
better off in the long run than if you just dived in there, figured  
it out, made your change and scarpered.

More information about the rspec-users mailing list