Sha256: b15549afb03bb6f629d30ae1e6d2bab4e6aadb1c5828ef2683d6240a5e9aca38
Contents?: true
Size: 829 Bytes
Versions: 2
Compression:
Stored size: 829 Bytes
Contents
require 'assert' require 'hella-redis/redis_connection' require 'connection_pool' require 'ostruct' module HellaRedis::RedisConnection class BaseTests < Assert::Context desc "a RedisConnection" setup do @config = OpenStruct.new({ :timeout => 1, :size => 5, :redis_ns => 'hella-redis-test', :driver => 'ruby', :url => 'redis://localhost:6379/0' }) @conn = HellaRedis::RedisConnection.new(@config) end subject{ @conn } should "be a connection pool with the configured size and timeout" do assert_kind_of ConnectionPool, subject end should "connect to the redis url" do assert_nothing_raised do subject.with do |conn| assert_kind_of Redis::Namespace, conn end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hella-redis-0.1.1 | test/unit/redis_connection_tests.rb |
hella-redis-0.1.0 | test/unit/redis_connection_tests.rb |