Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1899

PR (2422): (maint) Fix face_collection_spec to properly restore global state. - peterhuene

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.6.0
    • Component/s: None
    • Labels:
    • Template:

      Description

      (maint) Fix face_collection_spec to properly restore global state.

      Pull Request Description


      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


      (webhooks-id: a46da71d56a8f2530c17b3d4008c9014)

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            gepetto-bot gepetto-bot
            QA Contact:
            Kurt Wall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support