diff options
-rw-r--r-- | Modulefile | 11 | ||||
-rwxr-xr-x | spec/acceptance/getparam_spec.rb | 12 | ||||
-rwxr-xr-x | spec/acceptance/has_interface_with_spec.rb | 2 | ||||
-rw-r--r-- | spec/acceptance/loadyaml_spec.rb | 8 | ||||
-rwxr-xr-x | spec/acceptance/validate_augeas_spec.rb | 2 |
5 files changed, 13 insertions, 22 deletions
diff --git a/Modulefile b/Modulefile deleted file mode 100644 index bf80e3b..0000000 --- a/Modulefile +++ /dev/null @@ -1,11 +0,0 @@ -name 'puppetlabs-stdlib' -version '4.2.2' -source 'git://github.com/puppetlabs/puppetlabs-stdlib.git' -author 'puppetlabs' -license 'Apache 2.0' -summary 'Puppet Module Standard Library' -description 'Standard Library for Puppet Modules' -project_page 'https://github.com/puppetlabs/puppetlabs-stdlib' - -## Add dependencies, if any: -# dependency 'username/name', '>= 1.2.0' diff --git a/spec/acceptance/getparam_spec.rb b/spec/acceptance/getparam_spec.rb index 91fc9a0..e3e442f 100755 --- a/spec/acceptance/getparam_spec.rb +++ b/spec/acceptance/getparam_spec.rb @@ -3,18 +3,18 @@ require 'spec_helper_acceptance' describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do describe 'success' do - it 'getparam a package' do + it 'getparam a notify' do pp = <<-EOS - user { "rspec": - ensure => present, - managehome => true, + notify { 'rspec': + ensure => present, + message => 'custom rspec message', } - $o = getparam(User['rspec'], 'managehome') + $o = getparam(Notify['rspec'], 'message') notice(inline_template('getparam is <%= @o.inspect %>')) EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/getparam is true/) + expect(r.stdout).to match(/getparam is "custom rspec message"/) end end end diff --git a/spec/acceptance/has_interface_with_spec.rb b/spec/acceptance/has_interface_with_spec.rb index 7b38c95..99b7681 100755 --- a/spec/acceptance/has_interface_with_spec.rb +++ b/spec/acceptance/has_interface_with_spec.rb @@ -27,7 +27,7 @@ describe 'has_interface_with function', :unless => UNSUPPORTED_PLATFORMS.include end it 'has_interface_with existing interface' do pp = <<-EOS - if $osfamily == 'Solaris' { + if $osfamily == 'Solaris' or $osfamily == 'Darwin' { $a = 'lo0' } else { $a = 'lo' diff --git a/spec/acceptance/loadyaml_spec.rb b/spec/acceptance/loadyaml_spec.rb index 944a727..1e910a9 100644 --- a/spec/acceptance/loadyaml_spec.rb +++ b/spec/acceptance/loadyaml_spec.rb @@ -1,16 +1,18 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' +tmpdir = default.tmpdir('stdlib') + describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do describe 'success' do it 'loadyamls array of values' do - shell('echo "--- + shell("echo '--- aaa: 1 bbb: 2 ccc: 3 - ddd: 4" > /testyaml.yaml') + ddd: 4' > #{tmpdir}/testyaml.yaml") pp = <<-EOS - $o = loadyaml('/testyaml.yaml') + $o = loadyaml('#{tmpdir}/testyaml.yaml') notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>')) notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>')) notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>')) diff --git a/spec/acceptance/validate_augeas_spec.rb b/spec/acceptance/validate_augeas_spec.rb index aeec67a..71a4c84 100755 --- a/spec/acceptance/validate_augeas_spec.rb +++ b/spec/acceptance/validate_augeas_spec.rb @@ -1,7 +1,7 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'validate_augeas function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'validate_augeas function', :unless => ((UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem'))) or (fact('osfamily') == 'windows')) do describe 'prep' do it 'installs augeas for tests' end |