diff --git a/dalli.gemspec b/dalli.gemspec index 110372ca..4c737eb6 100644 --- a/dalli.gemspec +++ b/dalli.gemspec @@ -24,4 +24,6 @@ Gem::Specification.new do |s| 'changelog_uri' => 'https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md', 'rubygems_mfa_required' => 'true' } + + s.add_dependency 'logger' end diff --git a/test/helper.rb b/test/helper.rb index 7567f0ff..e3c4c8b9 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -11,7 +11,6 @@ require 'dalli' require 'logger' -require 'ostruct' require 'securerandom' Dalli.logger = Logger.new($stdout) diff --git a/test/integration/test_network.rb b/test/integration/test_network.rb index cac8a876..bc1fe8a3 100644 --- a/test/integration/test_network.rb +++ b/test/integration/test_network.rb @@ -15,7 +15,7 @@ describe 'with a fake server' do it 'handle connection reset' do - memcached_mock(->(sock) { sock.close }) do + memcached_mock(lambda(&:close)) do dc = Dalli::Client.new('localhost:19123') assert_raises Dalli::RingError, message: 'No server available' do dc.get('abc') @@ -25,7 +25,7 @@ it 'handle connection reset with unix socket' do socket_path = MemcachedMock::UNIX_SOCKET_PATH - memcached_mock(->(sock) { sock.close }, :start_unix, socket_path) do + memcached_mock(lambda(&:close), :start_unix, socket_path) do dc = Dalli::Client.new(socket_path) assert_raises Dalli::RingError, message: 'No server available' do dc.get('abc') diff --git a/test/protocol/test_binary.rb b/test/protocol/test_binary.rb index 7a18d27d..cb4f6740 100644 --- a/test/protocol/test_binary.rb +++ b/test/protocol/test_binary.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'ostruct' require_relative '../helper' describe Dalli::Protocol::Binary do