File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 28
28
end
29
29
30
30
describe "#topological_sort" do
31
- it "returns a sorted list of vertices" do
31
+ it "returns a sorted list of vertices" do # rubocop:disable RSpec/ExampleLength
32
32
graph = described_class . new
33
33
34
+ # stir-fry steps
34
35
cook_veggies = graph . add_vertex ( value : :cook_veggies )
35
36
cook_meat = graph . add_vertex ( value : :cook_meat )
36
37
prep_veggies = graph . add_vertex ( value : :prep_veggies )
46
47
graph . add_edge ( from : prep_veggies , to : cook_veggies )
47
48
graph . add_edge ( from : prep_meat , to : cook_meat )
48
49
50
+ graph . add_edge ( from : cook_meat , to : cook_veggies )
49
51
graph . add_edge ( from : cook_veggies , to : serve_meal )
50
52
graph . add_edge ( from : cook_meat , to : serve_meal )
51
53
graph . add_edge ( from : cook_rice , to : serve_meal )
You can’t perform that action at this time.
0 commit comments