Sha256: 3ca904e852a7b12f41eb749d6f1b9fe3d3521adb7cf94a6cf245a4dff4eaf36d

Contents?: true

Size: 630 Bytes

Versions: 2

Compression:

Stored size: 630 Bytes

Contents

# encoding: UTF-8

require File.expand_path("./helper", File.dirname(__FILE__))
require "redis/distributed"

setup do
  log = StringIO.new
  init Redis::Distributed.new(NODES, :logger => ::Logger.new(log))
end

test "MULTI/DISCARD" do |r|
  @foo = nil

  assert_raise Redis::Distributed::CannotDistribute do
    r.multi { @foo = 1 }
  end

  assert nil == @foo

  assert_raise Redis::Distributed::CannotDistribute do
    r.discard
  end
end

test "WATCH/UNWATCH" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.watch("foo")
  end

  assert_raise Redis::Distributed::CannotDistribute do
    r.unwatch
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
gorsuch-redis-3.0.0.rc1 test/distributed_transactions_test.rb
redis-3.0.0.rc1 test/distributed_transactions_test.rb