From 2ba03364309c2347ba4e5bf7dd815beef7563b7b Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 6 Nov 2008 12:14:05 -0600 Subject: Removing the PGraph class and subsuming it into SimpleGraph. This class is a holdover from when I was using GRATR, and it's obsolete now. Signed-off-by: Luke Kanies --- spec/unit/node/catalog.rb | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'spec/unit/node') diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb index 68b8af347..6451632d5 100755 --- a/spec/unit/node/catalog.rb +++ b/spec/unit/node/catalog.rb @@ -685,12 +685,8 @@ describe Puppet::Node::Catalog, " when creating a relationship graph" do @relationships = @catalog.relationship_graph end - it "should fail when trying to create a relationship graph for a relationship graph" do - proc { @relationships.relationship_graph }.should raise_error(Puppet::DevError) - end - it "should be able to create a relationship graph" do - @relationships.should be_instance_of(Puppet::Node::Catalog) + @relationships.should be_instance_of(Puppet::SimpleGraph) end it "should copy its host_config setting to the relationship graph" do @@ -810,6 +806,7 @@ describe Puppet::Node::Catalog, " when writing dot files" do @name = :test @file = File.join(Puppet[:graphdir], @name.to_s + ".dot") end + it "should only write when it is a host catalog" do File.expects(:open).with(@file).never @catalog.host_config = false @@ -817,21 +814,6 @@ describe Puppet::Node::Catalog, " when writing dot files" do @catalog.write_graph(@name) end - it "should only write when graphing is enabled" do - File.expects(:open).with(@file).never - @catalog.host_config = true - Puppet[:graph] = false - @catalog.write_graph(@name) - end - - it "should write a dot file based on the passed name" do - File.expects(:open).with(@file, "w").yields(stub("file", :puts => nil)) - @catalog.expects(:to_dot).with("name" => @name.to_s.capitalize) - @catalog.host_config = true - Puppet[:graph] = true - @catalog.write_graph(@name) - end - after do Puppet.settings.clear end -- cgit