summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/type/file.rb2
-rwxr-xr-xspec/unit/type/file.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index 7b2de7aaf..b6ad4fe93 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -479,7 +479,7 @@ module Puppet
options = @original_parameters.merge(:path => full_path, :implicit => true).reject { |param, value| value.nil? }
# These should never be passed to our children.
- [:parent, :ensure, :recurse, :target].each do |param|
+ [:parent, :ensure, :recurse, :target, :alias].each do |param|
options.delete(param) if options.include?(param)
end
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index 1bd049b5f..01199d0d0 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -598,9 +598,9 @@ describe Puppet::Type.type(:file) do
@file.newchild("my/path")
end
- {:recurse => true, :target => "/foo/bar", :ensure => :present}.each do |param, value|
+ {:recurse => true, :target => "/foo/bar", :ensure => :present, :alias => "yay"}.each do |param, value|
it "should not pass on #{param} to the sub resource" do
- @file[param] = value
+ @file = Puppet::Type::File.new(:name => @path, param => value, :catalog => @catalog)
@file.class.expects(:new).with { |params| params[param].nil? }