[chef] Chefspec question


Chronological Thread 
  • From: Bill Warner < >
  • To:
  • Subject: [chef] Chefspec question
  • Date: Wed, 7 Jan 2015 20:57:21 -0700

I've only been using chefspec for about a month now and was wondering, Is this a good idea?

it 'renders the file with content from ./spec/rendered_templates/template.conf' do
template_conf = File.read('./spec/rendered_templates/template.conf')
expect(chef_run).to render_file('/etc/template.conf').with_content(template_conf)
end

With a known default rendered template in rendered_templates of course.  It was what I though render_file would expect but I never saw it as an example anywhere.  It works as I expected so I'm using it.  Just not seeing it elsewhere makes me think there's something I'm missing.

Thanks,
--
--
Bill Warner



Archive powered by MHonArc 2.6.16.

§