I am reading the (beta) rspec book from prag progs as I am interested in behavioral testing of objects. From what I have learned so far (caution: after reading only 30 minutes), the main idea is that I want my object to behave as expected, “from the outside”, that is, in its output and in against other objects.
Is it true that I should just test my object with a black box to ensure the correct exit / interaction with other objects?
This may be completely wrong, but given that all attention is focused on how my object behaves in the system, it seems to be an ideology that could be accepted. If so, how do we focus on the implementation of the object? How to verify that my private method does what I want to do for all input types?
I believe this question may be valid for all types of testing? I'm still pretty new to TDD and BDD.
source
share