summaryrefslogtreecommitdiffstats
path: root/spec/unit/parameter
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-03-23 14:32:59 -0700
committerMax Martin <max@puppetlabs.com>2011-03-23 14:32:59 -0700
commit66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab (patch)
treeadb06f307051368e9fe9a23c3338fe7511eb8adf /spec/unit/parameter
parent36f4dc5e1527fc46f097080c12bb1ee5c3d46714 (diff)
parent3875b5ba9014a6ba540e51e0ffb411d58aa521e4 (diff)
Merge branch '2.6.next' into next
* 2.6.next: Fixed #6562 - Minor kick documentation fix (#6658) Propagate ENC connection errors to the agent (#4884) Remove typo from spec test (#4884) Modify tests to pass on non-OS X systems (#4884) Revise new exec tests, add a few more (#4884) Add an shell provider for execs (#4884) Fix Test::Unit exec tests (#4884) Break the exec type out to have a posix provider (#4884) Add consistent path validation and behavior (#4884) Add expand_path to requiring the spec_helper (#4884) Autorequire shared behaviors and method to silence warnings (#4884) Fix whitespace (#4884) Get rid of open3 require since it wasn't being used (#5814) Improved cron type specs (#5814) cron_spec shouldn't depend on cron provider Manually Resolved Conflicts: lib/puppet/util/command_line/puppetrun spec/spec_helper.rb spec/unit/type/exec_spec.rb spec/unit/type_spec.rb test/ral/type/exec.rb
Diffstat (limited to 'spec/unit/parameter')
-rw-r--r--spec/unit/parameter/path_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/unit/parameter/path_spec.rb b/spec/unit/parameter/path_spec.rb
new file mode 100644
index 000000000..08a26de33
--- /dev/null
+++ b/spec/unit/parameter/path_spec.rb
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+require File.expand_path(File.join(File.dirname(__FILE__), '../../spec_helper'))
+
+require 'puppet/parameter/path'
+
+[false, true].each do |arrays|
+ describe "Puppet::Parameter::Path with arrays #{arrays}" do
+ it_should_behave_like "all path parameters", :path, :array => arrays do
+ # The new type allows us a test that is guaranteed to go direct to our
+ # validation code, without passing through any "real type" overrides or
+ # whatever on the way.
+ Puppet::newtype(:test_puppet_parameter_path) do
+ newparam(:path, :parent => Puppet::Parameter::Path, :arrays => arrays) do
+ isnamevar
+ accept_arrays arrays
+ end
+ end
+
+ def instance(path)
+ Puppet::Type.type(:test_puppet_parameter_path).new(:path => path)
+ end
+ end
+ end
+end