summaryrefslogtreecommitdiff
path: root/spec/functions/glob_spec.rb
diff options
context:
space:
mode:
authorSascha Spreitzer <sspreitz@redhat.com>2017-02-04 13:30:59 +0100
committerSascha Spreitzer <sspreitz@redhat.com>2017-02-05 12:21:38 +0100
commit6092ede8d86746038df4a367191d232003652c55 (patch)
treeceec2b7519bb26fe02e323ce885ac26d82fbf321 /spec/functions/glob_spec.rb
parentdb8c1fbb2394d93fe3156b17c840455f1b3e2c76 (diff)
Add glob function
Diffstat (limited to 'spec/functions/glob_spec.rb')
-rwxr-xr-xspec/functions/glob_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/functions/glob_spec.rb b/spec/functions/glob_spec.rb
new file mode 100755
index 0000000..06439da
--- /dev/null
+++ b/spec/functions/glob_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe 'glob' do
+ it { is_expected.not_to eq(nil) }
+ it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError) }
+ it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError) }
+ it { is_expected.to run.with_params('').and_return([]) }
+ it { is_expected.to run.with_params(['']).and_return([]) }
+ it { is_expected.to run.with_params(['', '']).and_return([]) }
+ it { is_expected.to run.with_params(['/etc/xyzxyzxyz', '/etcxyzxyzxyz']).and_return([]) }
+end