title: rspec-puppet: cannot find class that is required
body: <p>So I have a fully functional 'ldap' class.</p>
  
  <p>Now I want to do some stuff for certain users in my ldap directory.</p>
  
  <p>I do this in a new 'users' module, by first making a new defined_type:</p>
  
  <pre><code>define users::admin (
    String $sshkey
  ) {
  
    file {"/home/${title}":
      ensure =&gt; directory,
      owner =&gt; $title,
      group =&gt; 'root',
      require =&gt; Class['ldap']
    }
    ...
  }
  </code></pre>
  
  <p>Then I use this defined type in my 'users' module's init.pp:</p>
  
  <pre><code>class users {
    users::admin {'ldt':
      sshkey =&gt; 'mysshkey',
    }
  }
  </code></pre>
  
  <p>But when I try to use 'pdk test unit' on this, I get the following error:</p>
  
  <pre><code>failed: rspec: ./spec/classes/users_spec.rb:8: error during compilation:
  Could not find resource 'Class[Ldap]' in parameter 'require'
  (file: ~/Projects/puppet/modules/users/spec/fixtures/modules/users
  /manifests/admin.pp, line: 15) on node &lt;mycomputer&gt;
  </code></pre>
  
  <p>For completeness's sake, here's my admin_spec.rb (barely changed from the pdk default):</p>
  
  <pre><code>require 'spec_helper'
  
  describe 'users::admin' do
    let(:title) { 'namevar' }
    let(:params) do
      {
        'sshkey' =&gt; ''
      }
    end
  
    on_supported_os.each do |os, os_facts|
      context "on #{os}" do
        let(:facts) { os_facts }
  
        it { is_expected.to compile }
      end
    end
  end
  </code></pre>
  
  <p>I tried setting my .fixtures.yml as follows, but that didn't help:</p>
  
  <pre><code>fixtures:
    symlinks:
      ldap: "#{source_dir}"
  </code></pre>
  
  <p>Any idea on what I'm doing wrong?</p>
  
  <p>EDIT: changed my .fictures.yml to:</p>
  
  <pre><code>fixtures:
    symlinks:
      ldap: "#{source_dir}/../ldap"
  </code></pre>
  
  <p>Heck I even manually added a symlink to my ldap module in the spec/fixtures/modules folders. Still the same error.</p>