summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/puppet/type/tidy.rb2
-rwxr-xr-xspec/unit/type/tidy.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index b5ccb3fb1..3d7190c27 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -139,7 +139,7 @@ Puppet::Type.newtype(:tidy) do
end
def tidy?(path, stat)
- if stat.size > value
+ if stat.size >= value
return true
else
return false
diff --git a/spec/unit/type/tidy.rb b/spec/unit/type/tidy.rb
index 88e2e280a..ccec9ed7c 100755
--- a/spec/unit/type/tidy.rb
+++ b/spec/unit/type/tidy.rb
@@ -273,6 +273,12 @@ describe tidy do
@sizer.must be_tidy("/what/ever", @stat)
end
+
+ it "should return true if the file is equal to the specified size" do
+ @stat.expects(:size).returns(1024)
+
+ @sizer.must be_tidy("/what/ever", @stat)
+ end
end
describe "and determining whether a file should be tidied" do