Puppet: Fixing a bug and writing a test for it