Could you add a test for the concat_fragment, e.g.

<pre>
    it do
      should contain_concat_fragment('puppet.conf+20-agent').
       with_content(/^\[agen\]/).
       with({})
    end
</pre>