Fix rspec injection

The changes made in 46630bd removed code that injects the hiera stubs into
the Puppet environment.  These changes add it back and cleans up some code repetition.