Sha256: a01fec741e6f098c2c13cfef80fd1ad261c8ebc5fd35858938c621bbe3d780fd
Contents?: true
Size: 576 Bytes
Versions: 4
Compression:
Stored size: 576 Bytes
Contents
require 'spec_helper' require 'logger' describe 'Adapters / Setting logger' do let(:logger_class) do Class.new do attr_reader :messages def initialize @messages = [] end def info(msg) @messages << msg end end end let(:logger) do logger_class.new end it 'sets up a logger for a given adapter' do setup = ROM.setup(memory: 'memory://localhost') setup.memory.use_logger(logger) rom = setup.finalize rom.memory.logger.info("test") expect(logger.messages).to eql(["test"]) end end
Version data entries
4 entries across 4 versions & 1 rubygems