Sha256: 4aa96d365b09574815fc97c7153addcc97e76f7d51cc3320510a80d544f82863
Contents?: true
Size: 583 Bytes
Versions: 14
Compression:
Stored size: 583 Bytes
Contents
require 'test/test_helper' class RedisAdapterTest < Test::Unit::TestCase def test_warn_on_disconnect_error if defined?(Redis) assert_nothing_raised do Redis.any_instance.stubs(:connect!) mocked_redis = stub("Redis") mocked_redis.expects(:client).raises(RuntimeError) redis_adapter = Vanity::Adapters::RedisAdapter.new({}) redis_adapter.expects(:warn).with("Error while disconnecting from redis: RuntimeError") redis_adapter.stubs(:redis).returns(mocked_redis) redis_adapter.disconnect! end end end end
Version data entries
14 entries across 14 versions & 4 rubygems