diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-07-05 10:18:42 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-07-05 10:18:42 +1000 |
commit | f4201a2b0a754ab6f276f4bf6e4fe7a976a1721e (patch) | |
tree | 794f4a6377c63e6ac034a9dcd5d488718f371354 /spec | |
parent | 84b566590fe05e6c390127d8e85dca323dd949bd (diff) | |
parent | 8865bdf112b33660a3e41b03f57d2575809e3cb4 (diff) | |
download | puppet-f4201a2b0a754ab6f276f4bf6e4fe7a976a1721e.tar.gz puppet-f4201a2b0a754ab6f276f4bf6e4fe7a976a1721e.tar.xz puppet-f4201a2b0a754ab6f276f4bf6e4fe7a976a1721e.zip |
Merge branch 'ticket/0.24.x/1067' of git://github.com/littleidea/puppet into 0.24.x
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 |