Refactored the PayrollEngine to take an array of Employees instead of a single one. This is neeed because we're about to start processing multiple employees. By doing this change by itself, I'm able to separate the refactoring from adding new features, so if a test fails while refactoring I'll know it's because I messed up, not that the new feature isn't working
Another refactoring to allow for the PayRecords returned from PayrollEngine.run_payroll to return an array of PayRecords instead of one. This caused changes through the PayrollEngine and the PayrollWriter, completely guided by the tests in what to change. Really powerful use of the tests here, as specs broke as I made changes to the code, telling me where to go fix next.
With those two refactorings done, implementing the new feature itself became easy. A couple of small changes to PayrollEngine and PayrollWriter and it just worked. This is the magic of having all these tests around your code. I was able to make changes to my system, see which tests those broke, and then work from the test into the code to fix what was broken. Then writing new tests pointed me to what needed to be enhanced in my system to create the new feature. It was easy, low pressure, and the process just worked