lib/redlock/testing.rb in seamusabshere-redlock-1.0.1 vs lib/redlock/testing.rb in seamusabshere-redlock-1.0.2

- old
+ new

@@ -21,7 +21,16 @@ alias_method :unlock_without_testing, :unlock def unlock(lock_info) unlock_without_testing lock_info unless @testing_mode == :bypass end + + class RedisInstance + def load_scripts + if @redis.respond_to?(:script) + @unlock_script_sha = @redis.script(:load, UNLOCK_SCRIPT) + @lock_script_sha = @redis.script(:load, LOCK_SCRIPT) + end + end + end end end