test/unit/connection_pool_tests.rb in hella-redis-0.4.0 vs test/unit/connection_pool_tests.rb in hella-redis-0.5.0
- old
+ new
@@ -1,12 +1,13 @@
-require 'assert'
-require 'hella-redis/connection_pool'
+# frozen_string_literal: true
-require 'redis-namespace'
+require "assert"
+require "hella-redis/connection_pool"
-class HellaRedis::ConnectionPool
+require "redis-namespace"
+class HellaRedis::ConnectionPool
class UnitTests < Assert::Context
desc "HellaRedis::Connection"
setup do
@connection_pool = HellaRedis::ConnectionPool.new(Factory.config)
end
@@ -14,13 +15,11 @@
should have_imeths :connection
should "build a redis namespace and yield it using `connection`" do
subject.connection do |connection|
- assert_instance_of ::Redis::Namespace, connection
- assert_nothing_raised{ connection.info }
+ assert_that(connection).is_an_instance_of(::Redis::Namespace)
+ assert_that{ connection.get(Factory.string) }.does_not_raise
end
end
-
end
-
end