Sha256: 918ae319f64e0c92530bfd7078775f5ad9c94975faa70453f1a08a5a3f572dad

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

require 'spec_helper'

module TransactionSpec
  class MockModel
    include Modis::Model
  end
end

describe Modis::Transaction do
  it 'yields the block in a transaction' do
    redis = double.as_null_object
    Modis.stub(:with_connection).and_yield(redis)
    redis.should_receive(:multi)
    TransactionSpec::MockModel.transaction {}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
modis-1.1.0 spec/transaction_spec.rb