Add rspec tests

This commit is contained in:
Jake Spain 2023-02-23 08:37:33 -05:00
parent 103a73b298
commit fb8c168751
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
6 changed files with 376 additions and 19 deletions

14
spec/helpers.rb Normal file
View file

@ -0,0 +1,14 @@
# frozen_string_literal: true
require 'mock_redis'
def redis
@redis ||= MockRedis.new
@redis
end
# Mock an object which represents a Logger. This stops the proliferation
# of allow(logger).to .... expectations in tests.
class MockLogger
def log(_level, string); end
end