summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/network/formats.rb3
-rwxr-xr-xspec/unit/network/formats.rb10
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/network/formats.rb b/lib/puppet/network/formats.rb
index 62569d4b1..92f778c70 100644
--- a/lib/puppet/network/formats.rb
+++ b/lib/puppet/network/formats.rb
@@ -186,3 +186,6 @@ Puppet::Network::FormatHandler.create(:pson, :mime => "text/pson", :weight => 10
klass.from_pson(data)
end
end
+
+# This is really only ever going to be used for Catalogs.
+Puppet::Network::FormatHandler.create(:dot, :mime => "text/dot", :required_methods => [:render_method])
diff --git a/spec/unit/network/formats.rb b/spec/unit/network/formats.rb
index 7b0c0adba..78b35fd13 100755
--- a/spec/unit/network/formats.rb
+++ b/spec/unit/network/formats.rb
@@ -263,6 +263,16 @@ describe "Puppet Network Format" do
end
end
+ describe "dot" do
+ before do
+ @dot = Puppet::Network::FormatHandler.format(:dot)
+ end
+
+ it "should have its mimetype set to text/dot" do
+ @dot.mime.should == "text/dot"
+ end
+ end
+
describe Puppet::Network::FormatHandler.format(:raw) do
before do
@format = Puppet::Network::FormatHandler.format(:raw)