spec/lib/rambling/trie/nodes/raw_spec.rb in rambling-trie-2.3.1 vs spec/lib/rambling/trie/nodes/raw_spec.rb in rambling-trie-2.4.0
- old
+ new
@@ -3,10 +3,16 @@
require 'spec_helper'
describe Rambling::Trie::Nodes::Raw do
let(:node) { described_class.new }
+ describe '#new' do
+ it 'is not a word' do
+ expect(node).not_to be_word
+ end
+ end
+
it_behaves_like 'a trie node implementation' do
def add_word_to_tree word
add_word node, word
end
@@ -14,13 +20,9 @@
add_words node, words
end
def assign_letter letter
node.letter = letter
- end
-
- it 'is not a word' do
- expect(node).not_to be_word
end
end
describe '#compressed?' do
it 'returns false' do