Sha256: 28a927fc46edcc306d7c70953505864a4efa780dbd4d1d458a105268c7ae976e
Contents?: true
Size: 500 Bytes
Versions: 2
Compression:
Stored size: 500 Bytes
Contents
require_relative 'spec_helper' describe Melisa::BytesTrie do let(:hash) { {'one' => '1', 'two' => '2', 'onetwo' => '3'} } let(:trie) { Melisa::BytesTrie.new(hash) } it "stores values" do trie['one'].should == '1' trie['two'].should == '2' trie['onetwo'].should == '3' end it "sets and gets values" do trie['five'] = "5" expect(trie['five']).to eq "5" end it "retreives many values by prefix" do expect(trie.get_all('one')).to match_array ['1', '3'] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
melisa-0.2.1 | spec/bytes_trie_spec.rb |
melisa-0.2.0 | spec/bytes_trie_spec.rb |