summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2010-06-28 14:00:22 -0700
committerNick Lewis <nick@puppetlabs.com>2010-06-28 14:00:22 -0700
commit76953d818892506ec4cb3ab2c4dd7048364a08cd (patch)
tree355d6bb6c22760ebf3476856237453a394030894
parent9afc67a465f030a2a1cad0e7ec58e30862f28b4d (diff)
maint: Fixes broken order-dependent Tidy specs
A few specs were using a global variable rather than a local, causing an order-dependent failure in which they were replacing the object under test.
-rwxr-xr-xspec/unit/type/tidy_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/type/tidy_spec.rb b/spec/unit/type/tidy_spec.rb
index 7e511899f..1b2f49798 100755
--- a/spec/unit/type/tidy_spec.rb
+++ b/spec/unit/type/tidy_spec.rb
@@ -98,9 +98,9 @@ describe tidy do
convertors.each do |unit, multiple|
it "should consider a %s to be %s seconds" % [unit, multiple] do
- tidy = Puppet::Type.type(:tidy).new :path => @basepath, :age => "5%s" % unit.to_s[0..0]
+ @tidy = Puppet::Type.type(:tidy).new :path => @basepath, :age => "5%s" % unit.to_s[0..0]
- tidy[:age].should == 5 * multiple
+ @tidy[:age].should == 5 * multiple
end
end
end
@@ -115,11 +115,11 @@ describe tidy do
convertors.each do |unit, multiple|
it "should consider a %s to be 1024^%s bytes" % [unit, multiple] do
- tidy = Puppet::Type.type(:tidy).new :path => @basepath, :size => "5%s" % unit
+ @tidy = Puppet::Type.type(:tidy).new :path => @basepath, :size => "5%s" % unit
total = 5
multiple.times { total *= 1024 }
- tidy[:size].should == total
+ @tidy[:size].should == total
end
end
end