Sha256: 091901a2cf74b66af897804001da1f1649e2563affb901d2ca9424ca39cbf07a
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true require "key_vortex/record" require "securerandom" class SampleRecord < KeyVortex::Record field :sample, String, length: 10 end RSpec.shared_context "an adapter" do let(:store) do KeyVortex.new( subject, SampleRecord ) end let(:record) do SampleRecord.new( key: SecureRandom.uuid, sample: "foo" ) end it "stores and removes a key" do store.save(record) expect(store.find(record.key)).to eq(record) subject.remove(record.key) expect(store.find(record.key)).to be_nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
key_vortex-contract-0.2.0 | lib/key_vortex/contract.rb |