diff options
author | Andrew Shafer <andrew@reductivelabs.com> | 2008-07-04 08:24:14 -0600 |
---|---|---|
committer | Andrew Shafer <andrew@reductivelabs.com> | 2008-07-04 08:24:14 -0600 |
commit | 8865bdf112b33660a3e41b03f57d2575809e3cb4 (patch) | |
tree | 48f0b36953430a5073c4f0588df148ef79d84ff1 /spec | |
parent | 7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4 (diff) | |
download | puppet-8865bdf112b33660a3e41b03f57d2575809e3cb4.tar.gz puppet-8865bdf112b33660a3e41b03f57d2575809e3cb4.tar.xz puppet-8865bdf112b33660a3e41b03f57d2575809e3cb4.zip |
file object creation should fail if source is not present
removed described? logic from insync? in ensure.rb and source.rb
raise in source#retrieve if the source is not found
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/type/file.rb | 12 |
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 |