Good tutorial, thanks!
I have a small remark, the test will not pass the second time is run, because the testFolder already exists.
I would change the line:
let testFolder = try tempFolder.createSubfolder(named: "CommandLineToolTests")
This is also a good example of the fact that well-written Swift is very functional-oriented and doesn’t use objects unless absolutely necessary. If your dependency can just be a closure, make it a closure. They’re first-class citizens just like objects (and so are structs and enums).