[rspec-users] State Based vs. Behaviour Based Spec/Testing
Scott Taylor
mailing_lists at railsnewbie.com
Sat Mar 24 03:08:15 EDT 2007
I've notice that a project like Rubinius has both a spec & a test
directory. Rspec has only a spec directory. Obviously I support
BDD, but isn't there also a place for state based/verification
testing? I sometimes sense that I *do* want to practice Test Driven
Development. That is, I want some assurance that my production code
will run as intended. But I also want some verification of a bug
right after I have implemented it.
How can one truly get away from state based testing to some degree?
Spec's often seem too "high level" to assure the "testing" of the code.
I know that Test::Unit code will always be brittle. What happens
when the code is refactored? It is sure to break.
Does this suggest that Test::Unit code should be written right after
development is done, covering the internals of the project? Maybe
BDD specs should be written first, using TDD with Test::Unit for
verification (as throw-away code)? Or do mock objects solve all of
these problems?
The real question is, do you spec'ers think there is any place for a
testing framework next to a spec'ing framework?
Best,
Scott Taylor
More information about the rspec-users
mailing list