summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-29 12:13:34 -0500
committerLuke Kanies <luke@madstop.com>2008-07-29 12:13:34 -0500
commit1064b5bdcd207efc20ae4ed0fd509364402964f9 (patch)
treea102fdfd3c58c64d65ffb151076e7267ad343a22
parent167831ee3b34eb42b6ca45fcbde2d66a015d90fa (diff)
downloadpuppet-1064b5bdcd207efc20ae4ed0fd509364402964f9.tar.gz
puppet-1064b5bdcd207efc20ae4ed0fd509364402964f9.tar.xz
puppet-1064b5bdcd207efc20ae4ed0fd509364402964f9.zip
Fixing the format_handler tests so that they clean up after themselves.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-xspec/unit/network/format_handler.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/network/format_handler.rb b/spec/unit/network/format_handler.rb
index 0b885ca8d..d142c3177 100755
--- a/spec/unit/network/format_handler.rb
+++ b/spec/unit/network/format_handler.rb
@@ -29,6 +29,13 @@ class FormatTester
end
describe Puppet::Network::FormatHandler do
+ after do
+ formats = Puppet::Network::FormatHandler.instance_variable_get("@formats")
+ formats.each do |name, format|
+ formats.delete(name) unless format.is_a?(Puppet::Network::Format)
+ end
+ end
+
it "should be able to test whether a format is supported" do
FormatTester.should respond_to(:support_format?)
end