source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/aliases/unixpath_spec.rb@ 30903

Last change on this file since 30903 was 30903, checked in by davidb, 7 years ago

Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details

File size: 1.0 KB
Line 
1require 'spec_helper'
2
3if Puppet.version.to_f >= 4.5
4 describe 'test::unixpath', type: :class do
5 describe 'valid handling' do
6 %w{
7 /usr2/username/bin:/usr/local/bin:/usr/bin:.
8 /var/tmp
9 /Users/helencampbell/workspace/puppetlabs-stdlib
10 }.each do |value|
11 describe value.inspect do
12 let(:params) {{ value: value }}
13 it { is_expected.to compile }
14 end
15 end
16 end
17
18 describe 'invalid path handling' do
19 context 'garbage inputs' do
20 [
21 nil,
22 [ nil ],
23 [ nil, nil ],
24 { 'foo' => 'bar' },
25 { },
26 '',
27 "C:/whatever",
28 "\\var\\tmp",
29 "\\Users/hc/wksp/stdlib",
30 "*/Users//nope"
31 ].each do |value|
32 describe value.inspect do
33 let(:params) {{ value: value }}
34 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::Unixpath/) }
35 end
36 end
37 end
38
39 end
40 end
41end
Note: See TracBrowser for help on using the repository browser.