require 'spec_helper' describe 'test::test_globalconfig_one' do platform 'centos' step_into :yum_globalconfig it do is_expected.to create_yum_globalconfig('/tmp/yum.conf') end it do is_expected.to create_template('/tmp/yum.conf') end it do is_expected.to render_file('/tmp/yum.conf').with_content( <<~EOF # This file was generated by Chef Infra Client # Do NOT modify this file by hand. [main] cachedir=/var/cache/yum/$basearch/$releasever debuglevel=2 exactarch=1 gpgcheck=1 installonly_limit=3 keepcache=0 localpkg_gpgcheck=0 logfile=/var/log/yum.log obsoletes=1 plugins=1 EOF ) end end