I'm afraid I'm going to have to just cargo-cult this in here. I don't yet understand the difference between the @provider.expects syntax versus the Puppet::Util::Execution.expects syntax, let vs @, etc. I think I understand that you can expect things on an instance method instead of making a stub.