Sha256: ea9ffa42378fcc65c6531f21e0704ce9a51f64b80dfe86a3974291c295515d2b
Contents?: true
Size: 590 Bytes
Versions: 24
Compression:
Stored size: 590 Bytes
Contents
#!/usr/bin/env ruby module Flapjack module Persistence class MockPersistenceBackend def initialize(options={}) @options = options @config = OpenStruct.new(@options) @queue = [] @log = @config.log end # log if the method is called (essentially, these are dodgy mocks) %w(any_parents_failed? save create_event).each do |method| class_eval <<-HERE def #{method}(*args) @log.info("method #{method} was called on MockPersistenceBackend") end HERE end end end end
Version data entries
24 entries across 24 versions & 1 rubygems