summaryrefslogtreecommitdiffstats
path: root/spec/unit/type/file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/type/file.rb')
-rwxr-xr-xspec/unit/type/file.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index 7f9688f0b..663c5dc15 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -69,6 +69,12 @@ describe Puppet::Type.type(:file) do
@filesource.server.stubs(:describe).raises(Puppet::Network::XMLRPCClientError.new("Testing"))
lambda { @file.retrieve }.should raise_error(Puppet::Error)
end
+
+ it "should fail during eval_generate if no remote sources exist" do
+ file = Puppet::Type.type(:file).create :path => "/foobar", :source => "/this/file/does/not/exist", :recurse => true
+
+ lambda { file.eval_generate }.should raise_error(Puppet::Error)
+ end
end
describe "when managing links" do