diff --git a/spec/unit/classes/concat_setup_spec.rb b/spec/unit/classes/concat_setup_spec.rb index 3096e73..b25428e 100644 --- a/spec/unit/classes/concat_setup_spec.rb +++ b/spec/unit/classes/concat_setup_spec.rb @@ -5,7 +5,14 @@ describe 'concat::setup', :type => :class do shared_examples 'setup' do |concatdir| concatdir = '/foo' if concatdir.nil? - let(:facts) {{ :concat_basedir => concatdir }} + let(:facts) do + { + :concat_basedir => concatdir, + :caller_module_name => 'Test', + :osfamily => 'Debian', + :id => 'root', + } + end it do should contain_file("#{concatdir}/bin/concatfragments.sh").with({ @@ -44,9 +51,10 @@ describe 'concat::setup', :type => :class do concatdir = '/foo' let(:facts) do { - :concat_basedir => concatdir, - :osfamily => 'Solaris', - :id => 'root', + :concat_basedir => concatdir, + :caller_module_name => 'Test', + :osfamily => 'Solaris', + :id => 'root', } end @@ -65,9 +73,10 @@ describe 'concat::setup', :type => :class do concatdir = '/foo' let(:facts) do { - :concat_basedir => concatdir, - :osfamily => 'windows', - :id => 'batman', + :concat_basedir => concatdir, + :caller_module_name => 'Test', + :osfamily => 'windows', + :id => 'batman', } end diff --git a/spec/unit/defines/concat_fragment_spec.rb b/spec/unit/defines/concat_fragment_spec.rb index 3c61aab..64ae7db 100644 --- a/spec/unit/defines/concat_fragment_spec.rb +++ b/spec/unit/defines/concat_fragment_spec.rb @@ -24,7 +24,14 @@ describe 'concat::fragment', :type => :define do end let(:title) { title } - let(:facts) {{ :concat_basedir => concatdir, :id => id }} + let(:facts) do + { + :concat_basedir => concatdir, + :id => id, + :osfamily => 'Debian', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + } + end let(:params) { params } let(:pre_condition) do "concat{ '#{p[:target]}': }" @@ -162,7 +169,13 @@ describe 'concat::fragment', :type => :define do context 'ensure => target and source' do let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} + let(:facts) do + { + :concat_basedir => '/tmp', + :osfamily => 'Debian', + :id => 'root', + } + end let(:params) do { :target => '/etc/motd', @@ -178,7 +191,13 @@ describe 'concat::fragment', :type => :define do context 'ensure => target and content' do let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} + let(:facts) do + { + :concat_basedir => '/tmp', + :osfamily => 'Debian', + :id => 'root', + } + end let(:params) do { :target => '/etc/motd', @@ -194,7 +213,13 @@ describe 'concat::fragment', :type => :define do context 'source and content' do let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} + let(:facts) do + { + :concat_basedir => '/tmp', + :osfamily => 'Debian', + :id => 'root', + } + end let(:params) do { :target => '/etc/motd', diff --git a/spec/unit/defines/concat_spec.rb b/spec/unit/defines/concat_spec.rb index e7be4d5..7682cdf 100644 --- a/spec/unit/defines/concat_spec.rb +++ b/spec/unit/defines/concat_spec.rb @@ -33,7 +33,15 @@ describe 'concat', :type => :define do let(:title) { title } let(:params) { params } - let(:facts) {{ :concat_basedir => concatdir, :id => id }} + let(:facts) do + { + :concat_basedir => concatdir, + :id => id, + :osfamily => 'Debian', + :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + :kernel => 'Linux', + } + end if p[:ensure] == 'present' it do