Sha256: 8e0405780273b03b39b8a24d0bbe3c211f3247ff87089a4dea77eb7ac71a6b92

Contents?: true

Size: 631 Bytes

Versions: 54

Compression:

Stored size: 631 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

54 entries across 54 versions & 7 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.5 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.4 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.3 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.2 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.1 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.7.0 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.9 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.8 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.7 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.6 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.5 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.4 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.3 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.2 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.1 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.6.0 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.5.17 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.5.16 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb
classiccms-0.5.15 vendor/bundle/gems/redis-2.2.2/test/distributed_transactions_test.rb