Sha256: a80e978951e6dcb964cc75a8d9b307645bf3c7a84f6724837bf1c11ff9094d3d
Contents?: true
Size: 561 Bytes
Versions: 5
Compression:
Stored size: 561 Bytes
Contents
require 'spec_helper' module Rambling module Trie describe Inspector do let(:root) do Root.new do |trie| %w(only three words).each { |word| trie << word } end end let(:node) { root[:o] } describe '#inspect' do it 'returns a pretty printed version of the node' do expect(root.inspect).to eq("#<Rambling::Trie::Root letter: nil, children: [:o, :t, :w]>") expect(node.inspect).to eq("#<Rambling::Trie::Node letter: :o, children: [:n]>") end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems