forester 4.3.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_views.rb DELETED
@@ -1,22 +0,0 @@
1
- require 'minitest_helper'
2
-
3
- class TestViews < Forester::Test
4
-
5
- def test_as_root_hash
6
- hash = YAML.load_file(PATH_TO_SIMPLE_TREE)
7
- add_empty_children_keys(hash['root'])
8
-
9
- expected = hash['root']
10
- actual = tree.as_root_hash(stringify_keys: true)
11
-
12
- assert_equal expected, actual
13
- end
14
-
15
- private
16
-
17
- def add_empty_children_keys(hash)
18
- hash['children'] = hash.fetch('children', [])
19
- hash['children'].each { |child| add_empty_children_keys(child) }
20
- end
21
-
22
- end
@@ -1,61 +0,0 @@
1
- ---
2
- root:
3
- name: root
4
- value: 0
5
- strings:
6
- - This is the root
7
- children:
8
- - name: First node of level 1
9
- value: 1
10
- color: Green
11
- tone: Dark
12
- tags:
13
- - First tag
14
- - Second tag
15
- - Third tag
16
- children:
17
- - name: First node of level 2
18
- value: 2
19
- strings:
20
- - Already in level 2
21
- - I want to be the very best
22
- - like no one ever was
23
- - name: Second node of level 2
24
- special: No other node has this field
25
- value: 3
26
- strings:
27
- - I have a sibling to my left
28
- - She wants to catch them all
29
- - name: Second node of level 1
30
- value: 4
31
- color: Green
32
- tone: Dark
33
- children:
34
- - name: Third node of level 2
35
- value: 5
36
- children:
37
- - name: First node of level 3
38
- value: 6
39
- tags:
40
- - Second tag
41
- - Third tag
42
- strings:
43
- - Reached level 3
44
- - It's dark
45
- - name: Second node of level 3
46
- value: 7
47
- strings:
48
- - A hidden secret lies in the deepest leaves...
49
- - Just kidding.
50
- children:
51
- - name: First node of level 4
52
- value: 8
53
- color: Yellow
54
- - name: Second node of level 4
55
- value: 9
56
- color: Yellow
57
- tags:
58
- - Third tag
59
- strings:
60
- - Could forester handle trees with hundreds of levels?
61
- - Maybe.