summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-06 12:14:05 -0600
committerLuke Kanies <luke@madstop.com>2008-11-06 12:14:05 -0600
commit2ba03364309c2347ba4e5bf7dd815beef7563b7b (patch)
tree3420007a97cfcad85a41eba0bfcd5d17117effcb /spec/unit/node
parente92c1cc724c489d9328567dfa082221a67184c92 (diff)
downloadpuppet-2ba03364309c2347ba4e5bf7dd815beef7563b7b.tar.gz
puppet-2ba03364309c2347ba4e5bf7dd815beef7563b7b.tar.xz
puppet-2ba03364309c2347ba4e5bf7dd815beef7563b7b.zip
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 <luke@madstop.com>
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/catalog.rb22
1 files changed, 2 insertions, 20 deletions
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