Quoting Marcelo de Moraes Serpa <firstname.lastname@example.org>:
> Correct. You can have and probably should have stories to test application
> level features and spec tests for the internals. You can do both and use
> Test::Unit tests too. The one conflict I am aware of is that when you
> RSpec "rake stats" no longer reports Test::Unit lines of code, etc., just
> RSpec lines of code.
Right. But Test::Unit and rSpec specs tests in the same application is not
really necessary nor wanted as, afaik, rSpec specs are meant to be a
"better" Test::Unit (or, a better way to do unit testing). So we could say
that rSpec spec fw and Test::Unit are mutually exclusive.
As they say, opinions vary. I was initially enthusiastic about RSpec. I
understand the reasons for trying a more non-tech readable approach.
Test::Unit has one very big advantage for me over RSpec specs, debugging.
Both are fine for testing and approximately equivalent. However once a
problem is found it speeds up debugging to be able to run just the test that
fails. Not the whole test section (rake spec:model or rake test:units) and
not the whole test file, e.g. "ruby spec/models/task_spec.rb". But the single
test/function, "ruby test/units/task_test.rb -n test_validate". So I have a
mixture of Test::Unit and RSpec spec and stories. Works for me.
They are not mutually exclusive which would say that using one prevents using
the other. You may choose to use just one or the other, but it is your
choice, not something enforced or required by either package.