repeat

Don’t repeat yourself: A principle within the world of software development that refers to the reduction of repetition within software patterns.

Don’t repeat yourself: A principle within the world of software development that refers to the reduction of repetition within software patterns.

When the whole string is written out, we are able to see right away that we’re expecting two slashes in the URL instead of just one. If the production code made a similar mistake, this test would neglect to detect a bug. Duplicating the base URL was a small price to pay for making the…