summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/type/file.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index 12b806d88..f0ae70cd0 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -31,6 +31,18 @@ describe Puppet::Type.type(:file) do
end
end
+ describe "when specifying a source" do
+ before do
+ @file[:source] = "/bar"
+ end
+
+ it "should raise if source doesn't exist" do
+ @file.property(:source).expects(:found?).returns(false)
+ lambda { @file.retrieve }.should raise_error(Puppet::Error)
+ end
+
+ end
+
describe "when retrieving remote files" do
before do
@filesource = Puppet::Type::File::FileSource.new