[rspec-users] Spec'ing via features
lists at ruby-forum.com
Mon Nov 24 20:34:15 EST 2008
> Wow, if that's it in a nutshell... :)
Thanks Pat, great summary.
I have to admit that I'm as crazy as Yehuda,
and believe that all we need are just acceptance tests,
at different layers of abstraction, for clients and developers.
I also see the benefits of speccing out single object's behaviors, with
the aim of a good design.
However, the drawbacks of doing this out-weight the benefits, in my
Testing how every method of an object is going to behave,
implies that after refactoring, that spec will no longer be useful,
eventhough the business and application logic stay the same.
I believe that being able to come up with a good design,
is not only dependent on writing tests before your implementation,
but also on knowing how to write a good implementation.
This can be gained through experience,
reading books, blogs, pair-programming,
using tools to tell you about the complexity of your code,
and a constant process of refactoring as we complete requirements,
and then fully understand what the best design could be.
Therefore in my opinion, by writing tests that guarantee
the correct functioning of the system, we have a robust suite of tests.
Let the refactoring come storming in and change the whole
but the tests should not be affected at all,
as I'm not testing my implementation nor design,
only the correct functioning of the system,
and relying on other tools on top of tests to maintain my code
nice, clean and understandable by anyone that comes along.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users