diff options
| author | Daniel Pittman <daniel@rimspace.net> | 2011-01-27 00:02:52 -0800 |
|---|---|---|
| committer | Daniel Pittman <daniel@rimspace.net> | 2011-02-03 17:02:16 -0800 |
| commit | adc9244ecf4bfb59a98a2dd5472b03f685b6303e (patch) | |
| tree | a8026e0e89924b1174a9caf600bd11e5b053533b /spec/unit | |
| parent | 2cf45283d7eea90461f1c9606af710bf5645076a (diff) | |
Feature #2597 -- generate a DOT graph of cycles on request.
When the '--graph' option is specified, generate a new 'cycles.dot' file and
report the location of that to the user. This contains only the cycles, in
dot format, allowing a visual representation of the cycle to be obtained
quickly.
This will include up to 10 paths through the cycle in the graph, and only one
in the display to the user, to reduce information overload.
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/simple_graph_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/simple_graph_spec.rb b/spec/unit/simple_graph_spec.rb index e7c875f50..2c6af063b 100755 --- a/spec/unit/simple_graph_spec.rb +++ b/spec/unit/simple_graph_spec.rb @@ -362,7 +362,7 @@ describe Puppet::SimpleGraph do add_edges "a" => "b", "b" => "c", "c" => "a" cycles = @graph.find_cycles_in_graph.sort - paths = @graph.all_paths_in_cycle(cycles.first) + paths = @graph.paths_in_cycle(cycles.first, 100) paths.should be == [%w{a b c a}] end @@ -374,7 +374,7 @@ describe Puppet::SimpleGraph do cycles = @graph.find_cycles_in_graph.sort cycles.length.should be == 1 - paths = @graph.all_paths_in_cycle(cycles.first) + paths = @graph.paths_in_cycle(cycles.first, 100) paths.sort.should be == [%w{a b1 a}, %w{a b2 a}] end @@ -385,7 +385,7 @@ describe Puppet::SimpleGraph do cycles = @graph.find_cycles_in_graph.sort cycles.length.should be == 1 - paths = @graph.all_paths_in_cycle(cycles.first) + paths = @graph.paths_in_cycle(cycles.first, 100) paths.should be == [%w{a b a}, %w{a b c a}] end @@ -396,11 +396,11 @@ describe Puppet::SimpleGraph do cycles.length.should be == 1 (1..20).each do |n| - paths = @graph.all_paths_in_cycle(cycles.first, n) + paths = @graph.paths_in_cycle(cycles.first, n) paths.length.should be == n end - paths = @graph.all_paths_in_cycle(cycles.first, 21) + paths = @graph.paths_in_cycle(cycles.first, 21) paths.length.should be == 20 end |
