Sha256: 944633bd6b3c19dcee0d56934ad313abb225614d14365e83e5c3c0ab19341088
Contents?: true
Size: 793 Bytes
Versions: 35
Compression:
Stored size: 793 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' module ObjectTests class User < RedisObject use_store :global end class Thingy < RedisObject end class Doodad < RedisObject end end describe RedisObject do it "can reconnect to redis" do RedisObject.reconnect! RedisObject.store.reconnect! end it "can dump to a file" do obj = ObjectTests::User.create("test") RedisObject.dump_stores_to_files("/tmp") RedisObject.store.flushdb end it "can restore from a file" do RedisObject.restore_stores_from_files("/tmp") ObjectTests::User.find("test").should be_a(ObjectTests::User) end it "can get all stores" do RedisObject.stores.count.should eq(1) end it "can reset stores" do RedisObject.stores.each do |(name,store)| store.reset end end end
Version data entries
35 entries across 35 versions & 1 rubygems