Sha256: c5de341086631dd511b14fab63854b12edd1a03930907aebff31d4c8d88870c0
Contents?: true
Size: 885 Bytes
Versions: 2
Compression:
Stored size: 885 Bytes
Contents
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require "rubygems" require "rico" module RiakHelpers def self.bucket "rico_test" end def self.reset! Rico.namespace = "test" Riak.disable_list_keys_warnings = true b = Rico.bucket(bucket) b.keys.each do |k| b.delete k end end def self.build_conflicted_robject(key, values) bucket = Rico.bucket RiakHelpers.bucket o = Riak::RObject.new bucket, key siblings = values.map do |v| x = Riak::RObject.new bucket, key x.data = v x end o = Riak::RObject.new bucket, key o.siblings = siblings o end def self.build_conflicted_rico_object(klass, key, values=["v1", "v2", "v3"]) o = build_conflicted_robject key, values v = klass.new RiakHelpers.bucket, key v.instance_variable_set("@riak_object", o) v end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rico-0.5.0 | spec/spec_helper.rb |
rico-0.4.0 | spec/spec_helper.rb |