title: How can I test "super" in a Chef resource?
body: <p>Is there an approach similar to <code>step_into</code> to encourage Chefspec to follow a resource's <code>super</code> call into its parent class? Or can you suggest an approach to test that the <code>super</code> call is followed (or not followed) as expected, to perform the appropriate action in the parent class?</p>
  <p>e.g.,</p>
  <pre><code>class Child &lt; Chef::Provider::Parent
    provides :child_resource
    def action_create
      # do childlike things
      super
    end
  end
  
  class Parent &lt; Chef::Provider::LWRPBase
    provides :parent_resource
    def action_create
      # do parental things
      file &quot;/home/mine/#{new_resource.name}.json&quot; do
        action :create
        content 'I am malformed json content'
      end
    end
  end
  </code></pre>
  <p>with recipe</p>
  <pre><code>child_resource 'ima_potato' do
    property 'vegechair'
  end
  </code></pre>
  <p>and tested with</p>
  <pre><code>require 'chefspec'
  
  describe('procreate-concreate') do
  
    let(:child_runner) do
      memoized_runner('procreate-concreate', {step_into: ['child_resource', 'parent_resource']}, 'child_runner') do |node|
        # node things
      end
    end
      
    it 'creates the parent resource' do
      expect(child_runner).to create_parent_resource('ima_potato')
    end
      
    it 'creates the parent file' do
      expect(child_runner).to create_file('/home/mine/ima_potato.json')
    end
  end
  </code></pre>
  <p>The above pattern works. My testing overlooked a missing boolean for a conditional.</p>