rambling-trie 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/README.md +23 -7
  4. data/Rakefile +4 -0
  5. data/lib/rambling/trie.rb +27 -21
  6. data/lib/rambling/trie/comparable.rb +3 -3
  7. data/lib/rambling/trie/compressible.rb +14 -0
  8. data/lib/rambling/trie/compressor.rb +37 -24
  9. data/lib/rambling/trie/configuration/properties.rb +8 -6
  10. data/lib/rambling/trie/configuration/provider_collection.rb +34 -16
  11. data/lib/rambling/trie/container.rb +156 -36
  12. data/lib/rambling/trie/enumerable.rb +4 -4
  13. data/lib/rambling/trie/nodes.rb +11 -0
  14. data/lib/rambling/trie/nodes/compressed.rb +115 -0
  15. data/lib/rambling/trie/nodes/missing.rb +10 -0
  16. data/lib/rambling/trie/nodes/node.rb +151 -0
  17. data/lib/rambling/trie/nodes/raw.rb +89 -0
  18. data/lib/rambling/trie/readers/plain_text.rb +1 -11
  19. data/lib/rambling/trie/serializers/marshal.rb +4 -4
  20. data/lib/rambling/trie/serializers/yaml.rb +4 -4
  21. data/lib/rambling/trie/serializers/zip.rb +9 -8
  22. data/lib/rambling/trie/version.rb +1 -1
  23. data/spec/assets/test_words.es_DO.txt +1 -0
  24. data/spec/integration/rambling/trie_spec.rb +40 -35
  25. data/spec/lib/rambling/trie/comparable_spec.rb +6 -15
  26. data/spec/lib/rambling/trie/compressor_spec.rb +88 -13
  27. data/spec/lib/rambling/trie/configuration/properties_spec.rb +7 -7
  28. data/spec/lib/rambling/trie/configuration/provider_collection_spec.rb +8 -20
  29. data/spec/lib/rambling/trie/container_spec.rb +159 -168
  30. data/spec/lib/rambling/trie/enumerable_spec.rb +12 -9
  31. data/spec/lib/rambling/trie/inspectable_spec.rb +11 -11
  32. data/spec/lib/rambling/trie/nodes/compressed_spec.rb +35 -0
  33. data/spec/lib/rambling/trie/nodes/node_spec.rb +7 -0
  34. data/spec/lib/rambling/trie/nodes/raw_spec.rb +177 -0
  35. data/spec/lib/rambling/trie/serializers/file_spec.rb +4 -4
  36. data/spec/lib/rambling/trie/serializers/marshal_spec.rb +3 -7
  37. data/spec/lib/rambling/trie/serializers/yaml_spec.rb +3 -7
  38. data/spec/lib/rambling/trie/serializers/zip_spec.rb +16 -20
  39. data/spec/lib/rambling/trie/stringifyable_spec.rb +7 -8
  40. data/spec/lib/rambling/trie_spec.rb +2 -2
  41. data/spec/spec_helper.rb +3 -1
  42. data/spec/support/config.rb +4 -0
  43. data/spec/support/helpers/add_word.rb +18 -0
  44. data/spec/support/shared_examples/{a_compressable_trie.rb → a_compressible_trie.rb} +13 -3
  45. data/spec/support/shared_examples/a_serializable_trie.rb +8 -6
  46. data/spec/support/shared_examples/a_serializer.rb +6 -0
  47. data/spec/{lib/rambling/trie/node_spec.rb → support/shared_examples/a_trie_node.rb} +61 -30
  48. data/spec/{lib/rambling/trie/compressed_node_spec.rb → support/shared_examples/a_trie_node_implementation.rb} +18 -69
  49. metadata +22 -15
  50. data/lib/rambling/trie/compressable.rb +0 -14
  51. data/lib/rambling/trie/compressed_node.rb +0 -120
  52. data/lib/rambling/trie/missing_node.rb +0 -8
  53. data/lib/rambling/trie/node.rb +0 -97
  54. data/lib/rambling/trie/raw_node.rb +0 -96
  55. data/spec/lib/rambling/trie/raw_node_spec.rb +0 -389
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Rambling::Trie do
4
4
  describe '.create' do
5
- let(:root) { Rambling::Trie::RawNode.new }
5
+ let(:root) { Rambling::Trie::Nodes::Raw.new }
6
6
  let(:compressor) { Rambling::Trie::Compressor.new }
7
7
  let!(:container) { Rambling::Trie::Container.new root, compressor }
8
8
 
@@ -65,7 +65,7 @@ describe Rambling::Trie do
65
65
  end
66
66
 
67
67
  describe '.load' do
68
- let(:root) { Rambling::Trie::RawNode.new }
68
+ let(:root) { Rambling::Trie::Nodes::Raw.new }
69
69
  let(:compressor) { Rambling::Trie::Compressor.new }
70
70
  let(:container) { Rambling::Trie::Container.new root, compressor }
71
71
  let(:serializer) { double :serializer, load: root }
data/spec/spec_helper.rb CHANGED
@@ -26,7 +26,9 @@ RSpec.configure do |config|
26
26
  end
27
27
 
28
28
  require 'support/config'
29
- require 'support/shared_examples/a_compressable_trie'
29
+ require 'support/shared_examples/a_compressible_trie'
30
30
  require 'support/shared_examples/a_serializable_trie'
31
31
  require 'support/shared_examples/a_serializer'
32
32
  require 'support/shared_examples/a_trie_data_structure'
33
+ require 'support/shared_examples/a_trie_node'
34
+ require 'support/shared_examples/a_trie_node_implementation'
@@ -1,5 +1,9 @@
1
+ require_relative 'helpers/add_word'
2
+
1
3
  RSpec.configure do |c|
2
4
  c.before do
3
5
  Rambling::Trie.config.reset
4
6
  end
7
+
8
+ c.include Support::Helpers::AddWord
5
9
  end
@@ -0,0 +1,18 @@
1
+ module Support
2
+ module Helpers
3
+ module AddWord
4
+ def add_words node, words
5
+ words.each { |word| add_word node, word }
6
+ end
7
+
8
+ def add_word node, word
9
+ case node
10
+ when Rambling::Trie::Container
11
+ node.add word
12
+ else
13
+ node.add word.chars.reverse.map(&:to_sym)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,10 +1,10 @@
1
- shared_examples_for 'a compressable trie' do
1
+ shared_examples_for 'a compressible trie' do
2
2
  context 'and the trie is not compressed' do
3
3
  it_behaves_like 'a trie data structure'
4
4
 
5
5
  it 'does not alter the input' do
6
6
  word = 'string'
7
- trie.add word
7
+ add_word trie, word
8
8
 
9
9
  expect(word).to eq 'string'
10
10
  end
@@ -15,12 +15,22 @@ shared_examples_for 'a compressable trie' do
15
15
  end
16
16
 
17
17
  context 'and the trie is compressed' do
18
- before { trie.compress! }
18
+ let!(:original_root) { trie.root }
19
+ let!(:original_tree) { original_root.children_tree.keys }
20
+
21
+ before do
22
+ trie.compress!
23
+ end
19
24
 
20
25
  it_behaves_like 'a trie data structure'
21
26
 
22
27
  it 'is marked as compressed' do
23
28
  expect(trie).to be_compressed
24
29
  end
30
+
31
+ it 'leaves the original root intact' do
32
+ expect(original_root.children_tree.keys).to eq original_tree
33
+ expect(trie.children_tree.keys).not_to eq original_tree
34
+ end
25
35
  end
26
36
  end
@@ -1,20 +1,22 @@
1
1
  shared_examples_for 'a serializable trie' do
2
+ let(:tmp_path) { File.join ::SPEC_ROOT, 'tmp' }
3
+ let(:filepath) { File.join tmp_path, "trie-root.#{format}" }
4
+
2
5
  context 'and the trie is not compressed' do
3
6
  before do
4
- Rambling::Trie.dump trie_to_serialize, trie_filepath, serializer
7
+ Rambling::Trie.dump trie_to_serialize, filepath
5
8
  end
6
9
 
7
- it_behaves_like 'a compressable trie' do
8
- let(:trie) { loaded_trie }
10
+ it_behaves_like 'a compressible trie' do
11
+ let(:trie) { Rambling::Trie.load filepath }
9
12
  end
10
13
  end
11
14
 
12
15
  context 'and the trie is compressed' do
13
- let(:trie) { loaded_trie }
16
+ let(:trie) { Rambling::Trie.load filepath }
14
17
 
15
18
  before do
16
- FileUtils.rm_f trie_filepath
17
- Rambling::Trie.dump trie_to_serialize.compress!, trie_filepath, serializer
19
+ Rambling::Trie.dump trie_to_serialize.compress!, filepath
18
20
  end
19
21
 
20
22
  it_behaves_like 'a trie data structure'
@@ -1,5 +1,11 @@
1
1
  shared_examples_for 'a serializer' do
2
+ let(:trie) { Rambling::Trie.create }
3
+ let(:tmp_path) { File.join ::SPEC_ROOT, 'tmp' }
4
+ let(:filepath) { File.join tmp_path, "trie-root.#{format}" }
5
+ let(:content) { trie.root }
6
+
2
7
  before do
8
+ trie.concat %w(a few words to validate that load and dump are working)
3
9
  FileUtils.rm_f filepath
4
10
  end
5
11
 
@@ -1,12 +1,45 @@
1
- require 'spec_helper'
1
+ shared_examples_for 'a trie node' do
2
+ let(:node_class) { node.class }
2
3
 
3
- describe Rambling::Trie::Node do
4
- let(:node) { Rambling::Trie::Node.new }
4
+ describe '.new' do
5
+ it 'has no letter' do
6
+ expect(node.letter).to be_nil
7
+ end
8
+
9
+ it 'has no children' do
10
+ expect(node.children.size).to eq 0
11
+ end
12
+
13
+ it 'is not terminal' do
14
+ expect(node).not_to be_terminal
15
+ end
16
+
17
+ it 'returns empty string as its word' do
18
+ expect(node.as_word).to be_empty
19
+ end
20
+
21
+ context 'with a letter and a parent' do
22
+ let(:parent) { node.class.new }
23
+ let(:node_with_parent) { node_class.new :a, parent }
24
+
25
+ it 'does not have any letter' do
26
+ expect(node_with_parent.letter).to eq :a
27
+ end
28
+
29
+ it 'has no children' do
30
+ expect(node_with_parent.children.size).to eq 0
31
+ end
32
+
33
+ it 'is not terminal' do
34
+ expect(node_with_parent).not_to be_terminal
35
+ end
36
+ end
37
+ end
5
38
 
6
39
  describe '#root?' do
7
40
  context 'when the node has a parent' do
8
41
  before do
9
- node.parent = double :parent
42
+ node.parent = node
10
43
  end
11
44
 
12
45
  it 'returns false' do
@@ -25,26 +58,6 @@ describe Rambling::Trie::Node do
25
58
  end
26
59
  end
27
60
 
28
- describe '.new' do
29
- let(:node) { Rambling::Trie::Node.new }
30
-
31
- it 'does not have any letter' do
32
- expect(node.letter).to be_nil
33
- end
34
-
35
- it 'includes no children' do
36
- expect(node.children.size).to eq 0
37
- end
38
-
39
- it 'is not a terminal node' do
40
- expect(node).not_to be_terminal
41
- end
42
-
43
- it 'returns empty string as its word' do
44
- expect(node.as_word).to be_empty
45
- end
46
- end
47
-
48
61
  describe '#terminal!' do
49
62
  it 'forces the node to be terminal' do
50
63
  expect(node).not_to be_terminal
@@ -59,27 +72,45 @@ describe Rambling::Trie::Node do
59
72
  end
60
73
 
61
74
  describe 'delegates and aliases' do
75
+ let(:children_tree) do
76
+ double :children_tree, {
77
+ :[] => 'value',
78
+ :[]= => nil,
79
+ has_key?: false,
80
+ delete: true,
81
+ }
82
+ end
83
+
84
+ before do
85
+ node.children_tree = children_tree
86
+ end
87
+
62
88
  it 'delegates `#[]` to its children tree' do
63
- expect(node.children_tree).to receive(:[]).with(:key).and_return('value')
64
89
  expect(node[:key]).to eq 'value'
90
+ expect(children_tree).to have_received(:[]).with :key
65
91
  end
66
92
 
67
93
  it 'delegates `#[]=` to its children tree' do
68
- expect(node.children_tree).to receive(:[]=).with(:key, 'value')
69
94
  node[:key] = 'value'
95
+ expect(children_tree).to have_received(:[]=).with(:key, 'value')
70
96
  end
71
97
 
72
98
  it 'delegates `#has_key?` to its children tree' do
73
- expect(node.children_tree).to receive(:has_key?).with(:present_key).and_return(true)
74
- expect(node).to have_key(:present_key)
99
+ allow(children_tree).to receive(:has_key?).with(:present_key).and_return true
75
100
 
76
- expect(node.children_tree).to receive(:has_key?).with(:absent_key).and_return(false)
101
+ expect(node).to have_key(:present_key)
77
102
  expect(node).not_to have_key(:absent_key)
78
103
  end
79
104
 
105
+ it 'delegates `#delete` to its children tree' do
106
+ expect(node.delete :key).to be true
107
+ expect(children_tree).to have_received(:delete).with :key
108
+ end
109
+
80
110
  it 'delegates `#children` to its children tree values' do
81
111
  children = [double(:child_1), double(:child_2)]
82
- expect(node.children_tree).to receive(:values).and_return(children)
112
+ allow(children_tree).to receive(:values).and_return children
113
+
83
114
  expect(node.children).to eq children
84
115
  end
85
116
  end
@@ -1,43 +1,7 @@
1
- require 'spec_helper'
2
-
3
- describe Rambling::Trie::CompressedNode do
4
- let(:node) { Rambling::Trie::CompressedNode.new }
5
-
6
- describe '#compressed?' do
7
- it 'returns true' do
8
- expect(node).to be_compressed
9
- end
10
- end
11
-
12
- describe '.new' do
13
- context 'with no parent' do
14
- let(:node) { Rambling::Trie::CompressedNode.new }
15
-
16
- it 'is marked as root' do
17
- expect(node).to be_root
18
- end
19
- end
20
-
21
- context 'with a specified' do
22
- let(:node) { Rambling::Trie::CompressedNode.new double(:root) }
23
-
24
- it 'is not marked as root' do
25
- expect(node).not_to be_root
26
- end
27
- end
28
- end
29
-
30
- describe '#add' do
31
- it 'raises an error' do
32
- expect { node.add 'restaurant' }.to raise_error Rambling::Trie::InvalidOperation
33
- end
34
- end
1
+ shared_examples_for 'a trie node implementation' do
2
+ it_behaves_like 'a trie node'
35
3
 
36
4
  describe '#partial_word?' do
37
- let(:raw_node) { Rambling::Trie::RawNode.new }
38
- let(:compressor) { Rambling::Trie::Compressor.new }
39
- let(:node) { compressor.compress raw_node }
40
-
41
5
  context 'when the chars array is empty' do
42
6
  it 'returns true' do
43
7
  expect(node.partial_word? []).to be true
@@ -47,7 +11,7 @@ describe Rambling::Trie::CompressedNode do
47
11
  context 'when the chars array is not empty' do
48
12
  context 'when the node has a tree that matches the characters' do
49
13
  before do
50
- raw_node.add 'abc'
14
+ add_word_to_tree 'abc'
51
15
  end
52
16
 
53
17
  it 'returns true' do
@@ -59,7 +23,7 @@ describe Rambling::Trie::CompressedNode do
59
23
 
60
24
  context 'when the node has a tree that does not match the characters' do
61
25
  before do
62
- raw_node.add 'cba'
26
+ add_word_to_tree 'cba'
63
27
  end
64
28
 
65
29
  it 'returns false' do
@@ -72,10 +36,6 @@ describe Rambling::Trie::CompressedNode do
72
36
  end
73
37
 
74
38
  describe '#word?' do
75
- let(:raw_node) { Rambling::Trie::RawNode.new }
76
- let(:compressor) { Rambling::Trie::Compressor.new }
77
- let(:node) { compressor.compress raw_node }
78
-
79
39
  context 'when the chars array is empty' do
80
40
  context 'when the node is terminal' do
81
41
  before do
@@ -97,7 +57,7 @@ describe Rambling::Trie::CompressedNode do
97
57
  context 'when the chars array is not empty' do
98
58
  context 'when the node has a tree that matches all the characters' do
99
59
  before do
100
- raw_node.add 'abc'
60
+ add_word_to_tree 'abc'
101
61
  end
102
62
 
103
63
  it 'returns true' do
@@ -107,7 +67,7 @@ describe Rambling::Trie::CompressedNode do
107
67
 
108
68
  context 'when the node has a tree that does not match all the characters' do
109
69
  before do
110
- raw_node.add 'abc'
70
+ add_word_to_tree 'abc'
111
71
  end
112
72
 
113
73
  it 'returns false' do
@@ -119,10 +79,6 @@ describe Rambling::Trie::CompressedNode do
119
79
  end
120
80
 
121
81
  describe '#scan' do
122
- let(:raw_node) { Rambling::Trie::RawNode.new }
123
- let(:compressor) { Rambling::Trie::Compressor.new }
124
- let(:node) { compressor.compress raw_node }
125
-
126
82
  context 'when the chars array is empty' do
127
83
  it 'returns itself' do
128
84
  expect(node.scan []).to eq node
@@ -131,44 +87,37 @@ describe Rambling::Trie::CompressedNode do
131
87
 
132
88
  context 'when the chars array is not empty' do
133
89
  before do
134
- raw_node.add 'cba'
90
+ add_word_to_tree 'cba'
135
91
  end
136
92
 
137
93
  context 'when the chars are found' do
138
94
  it 'returns the found child' do
139
- expect(node.scan %w(c)).to eq node[:cba]
140
- expect(node.scan %w(c b)).to eq node[:cba]
141
- expect(node.scan %w(c b a)).to eq node[:cba]
95
+ expect(node.scan %w(c)).to match_array %w(cba)
96
+ expect(node.scan %w(c b)).to match_array %w(cba)
97
+ expect(node.scan %w(c b a)).to match_array %w(cba)
142
98
  end
143
99
  end
144
100
 
145
101
  context 'when the chars are not found' do
146
- it 'returns a MissingNode' do
147
- expect(node.scan %w(a)).to be_a Rambling::Trie::MissingNode
148
- expect(node.scan %w(a b)).to be_a Rambling::Trie::MissingNode
149
- expect(node.scan %w(a b c)).to be_a Rambling::Trie::MissingNode
150
- expect(node.scan %w(c b a d)).to be_a Rambling::Trie::MissingNode
102
+ it 'returns a Nodes::Missing' do
103
+ expect(node.scan %w(a)).to be_a Rambling::Trie::Nodes::Missing
104
+ expect(node.scan %w(a b)).to be_a Rambling::Trie::Nodes::Missing
105
+ expect(node.scan %w(a b c)).to be_a Rambling::Trie::Nodes::Missing
106
+ expect(node.scan %w(c b a d)).to be_a Rambling::Trie::Nodes::Missing
151
107
  end
152
108
  end
153
109
  end
154
110
  end
155
111
 
156
112
  describe '#match_prefix' do
157
- let(:raw_node) { Rambling::Trie::RawNode.new }
158
- let(:compressor) { Rambling::Trie::Compressor.new }
159
- let(:node) { compressor.compress raw_node }
160
-
161
113
  before do
162
- raw_node.letter = :i
163
- raw_node.add 'gnite'
164
- raw_node.add 'mport'
165
- raw_node.add 'mportant'
166
- raw_node.add 'mportantly'
114
+ assign_letter :i
115
+ add_words_to_tree %w(gnite mport mportant mportantly)
167
116
  end
168
117
 
169
118
  context 'when the node is terminal' do
170
119
  before do
171
- raw_node.terminal!
120
+ node.terminal!
172
121
  end
173
122
 
174
123
  it 'adds itself to the words' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rambling-trie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Gonzalez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-19 00:00:00.000000000 Z
12
+ date: 2018-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -70,8 +70,7 @@ files:
70
70
  - lib/rambling-trie.rb
71
71
  - lib/rambling/trie.rb
72
72
  - lib/rambling/trie/comparable.rb
73
- - lib/rambling/trie/compressable.rb
74
- - lib/rambling/trie/compressed_node.rb
73
+ - lib/rambling/trie/compressible.rb
75
74
  - lib/rambling/trie/compressor.rb
76
75
  - lib/rambling/trie/configuration.rb
77
76
  - lib/rambling/trie/configuration/properties.rb
@@ -80,9 +79,11 @@ files:
80
79
  - lib/rambling/trie/enumerable.rb
81
80
  - lib/rambling/trie/inspectable.rb
82
81
  - lib/rambling/trie/invalid_operation.rb
83
- - lib/rambling/trie/missing_node.rb
84
- - lib/rambling/trie/node.rb
85
- - lib/rambling/trie/raw_node.rb
82
+ - lib/rambling/trie/nodes.rb
83
+ - lib/rambling/trie/nodes/compressed.rb
84
+ - lib/rambling/trie/nodes/missing.rb
85
+ - lib/rambling/trie/nodes/node.rb
86
+ - lib/rambling/trie/nodes/raw.rb
86
87
  - lib/rambling/trie/readers.rb
87
88
  - lib/rambling/trie/readers/plain_text.rb
88
89
  - lib/rambling/trie/serializers.rb
@@ -97,15 +98,15 @@ files:
97
98
  - spec/assets/test_words.es_DO.txt
98
99
  - spec/integration/rambling/trie_spec.rb
99
100
  - spec/lib/rambling/trie/comparable_spec.rb
100
- - spec/lib/rambling/trie/compressed_node_spec.rb
101
101
  - spec/lib/rambling/trie/compressor_spec.rb
102
102
  - spec/lib/rambling/trie/configuration/properties_spec.rb
103
103
  - spec/lib/rambling/trie/configuration/provider_collection_spec.rb
104
104
  - spec/lib/rambling/trie/container_spec.rb
105
105
  - spec/lib/rambling/trie/enumerable_spec.rb
106
106
  - spec/lib/rambling/trie/inspectable_spec.rb
107
- - spec/lib/rambling/trie/node_spec.rb
108
- - spec/lib/rambling/trie/raw_node_spec.rb
107
+ - spec/lib/rambling/trie/nodes/compressed_spec.rb
108
+ - spec/lib/rambling/trie/nodes/node_spec.rb
109
+ - spec/lib/rambling/trie/nodes/raw_spec.rb
109
110
  - spec/lib/rambling/trie/readers/plain_text_spec.rb
110
111
  - spec/lib/rambling/trie/serializers/file_spec.rb
111
112
  - spec/lib/rambling/trie/serializers/marshal_spec.rb
@@ -115,10 +116,13 @@ files:
115
116
  - spec/lib/rambling/trie_spec.rb
116
117
  - spec/spec_helper.rb
117
118
  - spec/support/config.rb
118
- - spec/support/shared_examples/a_compressable_trie.rb
119
+ - spec/support/helpers/add_word.rb
120
+ - spec/support/shared_examples/a_compressible_trie.rb
119
121
  - spec/support/shared_examples/a_serializable_trie.rb
120
122
  - spec/support/shared_examples/a_serializer.rb
121
123
  - spec/support/shared_examples/a_trie_data_structure.rb
124
+ - spec/support/shared_examples/a_trie_node.rb
125
+ - spec/support/shared_examples/a_trie_node_implementation.rb
122
126
  - spec/tmp/.gitkeep
123
127
  homepage: http://github.com/gonzedge/rambling-trie
124
128
  licenses:
@@ -149,15 +153,15 @@ test_files:
149
153
  - spec/assets/test_words.es_DO.txt
150
154
  - spec/integration/rambling/trie_spec.rb
151
155
  - spec/lib/rambling/trie/comparable_spec.rb
152
- - spec/lib/rambling/trie/compressed_node_spec.rb
153
156
  - spec/lib/rambling/trie/compressor_spec.rb
154
157
  - spec/lib/rambling/trie/configuration/properties_spec.rb
155
158
  - spec/lib/rambling/trie/configuration/provider_collection_spec.rb
156
159
  - spec/lib/rambling/trie/container_spec.rb
157
160
  - spec/lib/rambling/trie/enumerable_spec.rb
158
161
  - spec/lib/rambling/trie/inspectable_spec.rb
159
- - spec/lib/rambling/trie/node_spec.rb
160
- - spec/lib/rambling/trie/raw_node_spec.rb
162
+ - spec/lib/rambling/trie/nodes/compressed_spec.rb
163
+ - spec/lib/rambling/trie/nodes/node_spec.rb
164
+ - spec/lib/rambling/trie/nodes/raw_spec.rb
161
165
  - spec/lib/rambling/trie/readers/plain_text_spec.rb
162
166
  - spec/lib/rambling/trie/serializers/file_spec.rb
163
167
  - spec/lib/rambling/trie/serializers/marshal_spec.rb
@@ -167,8 +171,11 @@ test_files:
167
171
  - spec/lib/rambling/trie_spec.rb
168
172
  - spec/spec_helper.rb
169
173
  - spec/support/config.rb
170
- - spec/support/shared_examples/a_compressable_trie.rb
174
+ - spec/support/helpers/add_word.rb
175
+ - spec/support/shared_examples/a_compressible_trie.rb
171
176
  - spec/support/shared_examples/a_serializable_trie.rb
172
177
  - spec/support/shared_examples/a_serializer.rb
173
178
  - spec/support/shared_examples/a_trie_data_structure.rb
179
+ - spec/support/shared_examples/a_trie_node.rb
180
+ - spec/support/shared_examples/a_trie_node_implementation.rb
174
181
  - spec/tmp/.gitkeep