Sha256: a04972c25252ff2fa155040dfd4c8b79d5b918dcfee5d9063ad922df474c8b2d

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

require 'rspec'
require_relative "../lib/redis_migrator.rb"
require 'mock_redis'

class PipeMock
  def initialize(redis)
    @redis = redis
  end

  def close; true; end

  def <<(val)
    val[0] = val[0].downcase.to_sym
    @redis.send(*val)
  end
end


class Redis
  module Helper
    def to_redis_proto(*cmd)
      cmd
    end
  end
end

def prefill_cluster(cluster)
  ('a'..'z').to_a.each do |key|
    (1..5).to_a.each {|val| cluster.sadd(key, val)}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redis_migrator-0.1.2 spec/spec_helper.rb
redis_migrator-0.1.1 spec/spec_helper.rb