class Puppet::Module
Puppet
loads init.pp, then foo.pp, to find class “mod::foo”. If class “mod” has been mocked using pre_condition when testing “mod::foo”, this causes duplicate declaration for “mod”. This monkey patch only loads “init.pp” if “foo.pp” does not exist.