Underspecification
Definition:
While it’s clearly possible for a test suite to do too much, it’s far more common for it to do too little.
Code Example:
MIN_FREE_SHIPPING_PRICE = 25.0
def free_shipping?(total_order_price)
total_order_price > MIN_FREE_SHIPPING_PRICE
end
def test_free_shipping_returns_true_for_order_above_min_price
assert free_shipping?(MIN_FREE_SHIPPING_PRICE + 1)
end
def test_free_shipping_returns_false_for_order_below_min_price
assert !free_shipping?(MIN_FREE_SHIPPING_PRICE - 1)
end
References:
Quality attributes
- Code Example
- Cause and Effect
- Frequency
- Refactoring