Reputation: 25368
I'm just starting to grasp BDD and RSpec and one thing I'm really having trouble with is figuring out how thorough I should be with my testing.
I'm just not understanding how fine-grained my testing should be to still be useful but not double development time.
Is it just a matter of preference? Or is there some general standard for what should be tested?
Upvotes: 2
Views: 128
Reputation: 3526
There's a few factors to consider here.
I find it helpful to think of Tests/Specs as a safety net. I want a spec to fail if another dev (or myself) breaks something that I spent time to make work. I don't want them to have to spend a lot of time changing specs for things that don't really matter. I also don't want to inhibit them from improving the application because of specs that test things that weren't important to me when writing the code.
Upvotes: 5