Sha256: 3b55ed33766a04c5bf6669ec844ca1d2c4481f300698869239f25935b774199f
Contents?: true
Size: 692 Bytes
Versions: 39
Compression:
Stored size: 692 Bytes
Contents
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
39 entries across 39 versions & 1 rubygems