iOS Unit Testing by Example: loadViewIfNeeded() called twice (page 90)

The text says “The test loads the view controller from the storyboard. Then it sets the make- Analytics property to a closure returning an instance suitable for testing. Notice that it does this before calling loadViewIfNeeded() so the replacement closure is ready before any view controller methods fire.”

But the code shown calls loadViewIfNeeded() both before and after setting the makeAnalytics closure.