In languages with sufficient reflection this can be automated, such as with RSpec verifying doubles in Ruby.
Full disclosure: I am on the RSpec team.
There is still something to be said for contract-style tests, but for a lot of cases automatic verification is enough.
In languages with sufficient reflection this can be automated, such as with RSpec verifying doubles in Ruby.
Full disclosure: I am on the RSpec team.
There is still something to be said for contract-style tests, but for a lot of cases automatic verification is enough.