puppetlabs/puppet — pull request #2422 by peterhuene (2014-03-08 05:44:07+00:00)
Title: (maint) Fix face_collection_spec to properly restore global state.

The spec attempts to restore global state stored in
Puppet::Interface::FaceCollection so that it doesn't interfere with
other specs that may use faces.

It fails to clear any files required by the autoloader, but clears the
@faces member. The result is that if a face is referenced again from
another spec, it doesn't get defined and added to @faces and cannot be
found.

The fix is to clear the state before and after each example.

The problem can be observed with the following:
rspec spec/unit/interface/face_collection_spec.rb spec/unit/application/face_base_spec.rb