Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / get_module_path_spec.rb
1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
3
4 describe 'get_module_path function' do
5   describe 'success' do
6     it 'get_module_paths dne' do
7       pp = <<-EOS
8       $a = $::is_pe ? {
9         'true'  => '/etc/puppetlabs/puppet/modules/dne',
10         'false' => '/etc/puppet/modules/dne',
11       }
12       $o = get_module_path('dne')
13       if $o == $a {
14         notify { 'output correct': }
15       } else {
16         notify { "failed; module path is '$o'": }
17       }
18       EOS
19
20       apply_manifest(pp, :expect_failures => true)
21     end
22   end
23   describe 'failure' do
24     it 'handles improper argument counts'
25     it 'handles non-numbers'
26   end
27 end