title: Test file initialization based off template using ChefSpec
body: <p>I've got the following template file creation in my cookbook:</p>
  
  <pre><code>template "my_file" do
    path "my_path"
    source "my_file.erb"
    owner "root"
    group "root"
    mode "0644"
    variables(@template_variables)
    notifies :restart, resources(service: "my_service")
  end
  </code></pre>
  
  <p>and the following assertions in my ChefSpec tests:</p>
  
  <pre><code>  chef_run.should create_file "my_file"
    chef_run.file("my_file").should be_owned_by('root', 'root')
  </code></pre>
  
  <p>Which results in the following failure:</p>
  
  <pre><code>  No file resource named 'my_file' with action :create found.
  </code></pre>
  
  <p>This is due to the fact that I am not using a<code>file</code> resource but a <code>template</code> resource. Question: How can I test for file creation off a template resource using ChefSpec?</p>