Sha256: 8eaf6a5111a6123165f20bde7fa4eb3f40777b74709e1a4d468f5e0f5b3f99dd
Contents?: true
Size: 711 Bytes
Versions: 4
Compression:
Stored size: 711 Bytes
Contents
# encoding: utf-8 class Nanoc::Int::ChecksumStoreTest < Nanoc::TestCase def test_get_with_existing_object require 'pstore' # Create store FileUtils.mkdir_p('tmp') pstore = PStore.new('tmp/checksums') pstore.transaction do pstore[:data] = { [:item, '/moo/'] => 'zomg' } pstore[:version] = 1 end # Check store = Nanoc::Int::ChecksumStore.new store.load obj = Nanoc::Int::Item.new('Moo?', {}, '/moo/') assert_equal 'zomg', store[obj] end def test_get_with_nonexistant_object store = Nanoc::Int::ChecksumStore.new store.load # Check obj = Nanoc::Int::Item.new('Moo?', {}, '/animals/cow/') assert_equal nil, store[obj] end end
Version data entries
4 entries across 4 versions & 1 rubygems