Sha256: 76cf59987cb862720496181a08467e83d40f6360c08154809d2001b9c6c0ec26

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class CacheVersionTest < Test::Unit::TestCase
  context 'with a memcache and db connection' do
    setup do
      system('memcached -d')
      CACHE.servers = ["localhost:11211"]
      CacheVersionMigration.up
    end
    
    teardown do
      system('killall memcached')
      CacheVersionMigration.down
    end

    should 'increment cache version' do
      5.times do |i|
        assert_equal i, Object.version
        Object.increment_version
        assert_equal i + 1, Object.version
      end
      CacheVersion.clear_cache
      assert_equal 5, Object.version
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ninjudd-cache_version-0.9.3 test/cache_version_test.rb
ninjudd-cache_version-0.9.4 test/cache_version_test.rb