We have discussed testing and testability with a view to ensuring high-quality code. But what about the feature itself? What use are excellent code and tests if the feature itself is bad? Indeed, software engineers have struggled to find ways of improving the overall quality of the system they work on. One of the more successful, and more popular, methods of addressing the problem of feature or product quality in software is BDD, which was developed in the mid-2000s by Dan North, Martin Fowler, and Aslak Hellesoy. This methodology seeks to describe the behavior of software from the outside in and justify this behavior in terms of business value. BDD developed alongside RSpec, which was the first widely used BDD framework. Therefore, it is natural that we explore the methodology so that we understand the motivation behind RSpec itself.
BDD concerns itself with ensuring that the right software is developed. Contrast this with our typical concern when writing tests, which is to...