Chapter 3 Exercise 2: Eliminate duplicate code in view's title tests