This fixes the issue described in #60 and #58 for me. It passes tests on puppet 3 also.
I'm positive there is a better way to re-initialize the puppet engine, however, I tried calling various clear methods before settling on this with no positive results.
Fix puppet 3 classloading issue by moving initialize_settings to befo…
…re compiling catalog
This doesn't work for me, because Puppet includes a check that raises an exception if this is called more than once:
What version of puppet? I've been using the version here for some time locally with no issues. 3.0.1 here.
@jmslagle Look at the related issues (#60 and #58), which are caused by a known Puppet bug. You can work around by making 1 spec per class or something like that. That is how I am getting around it.
But I just wanted to note that this pull request could just never work.
Oh sorry, thought you were someone different. If you look at the source code of Puppet no matter what it hits that line and raises an exception. I have no idea how yours is working.
This is a bug in puppet: https://projects.puppetlabs.com/issues/15529
The fix to puppet seems to address this, however it raises the multiple init thing reported above. rspec-puppet will need modified to no longer init.
Fix for Puppet > 3 && < 3.1
From @jmslagle's PR #61