In this listing, it appears that the function private login(String username, String password) is nested inside the functional test def "Submitting a new post". A direct copy and pasting of this listing into the file TimelineFunctionalSpec.groovy causes errors when trying to run the functional test. Looking at chapter 9's source code here, I confirmed my suspicion that the nesting isn't correct.
In this listing, it appears that the function private login(String username, String password) is nested inside the functional test def "Submitting a new post". A direct copy and pasting of this listing into the file TimelineFunctionalSpec.groovy causes errors when trying to run the functional test. Looking at chapter 9's source code here, I confirmed my suspicion that the nesting isn't correct.