ScalaTest consists of lots of lightweight traits that are focused around solutions for similar or unique problems. This allows us to mix them together to solve the problem in hand.
Testing convention dictates that instead of mixing the same traits in all tests, we create a base class, which mixes all the required traits used by all the tests in the application. This gives a uniform DSL across all tests in the project. There may be cases when one particular tests need to mix a few more traits, and it's fine to do so for those individual tests.
We will be using the same principle in our example application that we wrote in previous chapters. We will create a base class that we will endeavor to reuse for all the tests. At this point, we need to make sure that we are happy to use the same DSL across all tests and what that DSL should be.
Instead of duplicating code by mixing the same traits together repeatedly, we recommend you create abstract base classes for your project that...