# File lib/rspec-puppet/support.rb, line 150
    def build_catalog_without_cache(nodename, facts_val, hiera_config_val, code, exported)

      # If we're going to rebuild the catalog, we should clear the cached instance
      # of Hiera that Puppet is using.  This opens the possibility of the catalog
      # now being rebuilt against a differently configured Hiera (i.e. :hiera_config
      # set differently in one example group vs. another).
      # It would be nice if Puppet offered a public API for invalidating their
      # cached instance of Hiera, but que sera sera.  We will go directly against
      # the implementation out of absolute necessity.
      HieraPuppet.instance_variable_set('@hiera', nil) if defined? HieraPuppet

      Puppet[:code] = code

      stub_facts! facts_val

      node_facts = Puppet::Node::Facts.new(nodename, facts_val.dup)

      node_obj = Puppet::Node.new(nodename, { :parameters => facts_val, :facts => node_facts })

      adapter.catalog(node_obj, exported)
    end