test/test_helper.rb in identity_cache-0.2.4 vs test/test_helper.rb in identity_cache-0.2.5
- old
+ new
@@ -22,14 +22,19 @@
end
alias_method_chain :read_multi, :instrumentation
end
-class IdentityCache::TestCase < MiniTest::Unit::TestCase
+MiniTest::Test = MiniTest::Unit::TestCase unless defined?(MiniTest::Test)
+class IdentityCache::TestCase < Minitest::Test
include ActiveRecordObjects
attr_reader :backend
def setup
+ if ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks=)
+ ActiveRecord::Base.raise_in_transactional_callbacks = true
+ end
+
DatabaseConnection.drop_tables
DatabaseConnection.create_tables
IdentityCache.logger = Logger.new(nil)
IdentityCache.cache_backend = @backend = ActiveSupport::Cache::MemcachedStore.new("localhost:11211", :support_cas => true)