Sha256: 92ccff3eb03dd8cf79be1622e16f79ebba30b8691c9f6a407b032f611abd7c3d

Contents?: true

Size: 579 Bytes

Versions: 11

Compression:

Stored size: 579 Bytes

Contents

# encoding: UTF-8

require "helper"

class TestDistributedTransactions < Test::Unit::TestCase

  include Helper::Distributed

  def test_multi_discard
    @foo = nil

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

    assert_equal nil, @foo

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

  def test_watch_unwatch
    assert_raise Redis::Distributed::CannotDistribute do
      r.watch("foo")
    end

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

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
redis-3.0.5 test/distributed_transactions_test.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/redis-3.0.4/test/distributed_transactions_test.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/redis-3.0.4/test/distributed_transactions_test.rb
redis-3.0.4 test/distributed_transactions_test.rb
redis-3.0.3 test/distributed_transactions_test.rb
remq-0.0.4 vendor/bundle/gems/redis-3.0.2/test/distributed_transactions_test.rb
remq-0.0.3 vendor/bundle/gems/redis-3.0.2/test/distributed_transactions_test.rb
redis-3.0.2 test/distributed_transactions_test.rb
redis-3.0.1 test/distributed_transactions_test.rb
redis-3.0.0 test/distributed_transactions_test.rb
redis-3.0.0.rc2 test/distributed_transactions_test.rb