diff options
author | Luke Kanies <luke@puppetlabs.com> | 2010-04-12 11:17:52 -0700 |
---|---|---|
committer | Luke Kanies <luke@puppetlabs.com> | 2010-04-12 11:17:52 -0700 |
commit | 03532e087946fb4002b218eec477899ffb5860b3 (patch) | |
tree | e5b6379fff049fe3f4c341cbc8f7d3cfc4c60ff5 /spec | |
parent | 006e6afd6e15c32ef0b49eefd0366fba694a0cf5 (diff) | |
download | puppet-03532e087946fb4002b218eec477899ffb5860b3.tar.gz puppet-03532e087946fb4002b218eec477899ffb5860b3.tar.xz puppet-03532e087946fb4002b218eec477899ffb5860b3.zip |
Porting a simple set of tests from test/unit
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/type/file.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb index 64ac135f8..f9c691b11 100755 --- a/spec/unit/type/file.rb +++ b/spec/unit/type/file.rb @@ -16,6 +16,25 @@ describe Puppet::Type.type(:file) do @file.catalog = @catalog end + describe "when determining if recursion is enabled" do + it "should default to recursion being disabled" do + @file.should_not be_recurse + end + [true, "true", 10, "inf", "remote"].each do |value| + it "should consider #{value} to enable recursion" do + @file[:recurse] = value + @file.must be_recurse + end + end + + [false, "false", 0].each do |value| + it "should consider #{value} to disable recursion" do + @file[:recurse] = value + @file.should_not be_recurse + end + end + end + describe "#write" do it "should propagate failures encountered when renaming the temporary file" do |