summaryrefslogtreecommitdiffstats
path: root/spec/unit/simple_graph.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-24 16:24:18 -0500
committerLuke Kanies <luke@madstop.com>2009-04-24 16:27:21 -0500
commit6f8900d2931acfb96b810904572aecc675d28168 (patch)
treef89627efe11a66b5fe270bdb9f18c0224cc4d567 /spec/unit/simple_graph.rb
parent3f7cd18604e972e78bc9182e09cc4defa46b7d8d (diff)
downloadpuppet-6f8900d2931acfb96b810904572aecc675d28168.tar.gz
puppet-6f8900d2931acfb96b810904572aecc675d28168.tar.xz
puppet-6f8900d2931acfb96b810904572aecc675d28168.zip
Always making sure graph edges appear first
If we don't do this, there's a chance we'll get hit by the ruby yaml bug again. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/simple_graph.rb')
-rwxr-xr-xspec/unit/simple_graph.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/simple_graph.rb b/spec/unit/simple_graph.rb
index 2e7bad658..739ce4ee8 100755
--- a/spec/unit/simple_graph.rb
+++ b/spec/unit/simple_graph.rb
@@ -31,6 +31,13 @@ describe Puppet::SimpleGraph do
proc { @graph.to_dot_graph }.should_not raise_error
end
+ it "should always put its edges first when printing yaml" do
+ @graph = Puppet::SimpleGraph.new
+ @graph.add_edge(:one, :two)
+ p @graph.to_yaml_properties
+ @graph.to_yaml_properties[0].should == "@edges"
+ end
+
describe "when managing vertices" do
before do
@graph = Puppet::SimpleGraph.new