lib/message_driver/adapters/base.rb in message-driver-0.2.2 vs lib/message_driver/adapters/base.rb in message-driver-0.3.0

- old
+ new

@@ -1,15 +1,17 @@ module MessageDriver module Adapters class Base include Logging + attr_reader :broker + def contexts @contexts ||= [] end - def initialize(configuration) + def initialize(broker, configuration) raise "Must be implemented in subclass" end def new_context ctx = build_context @@ -17,9 +19,13 @@ ctx end def build_context raise "Must be implemented in subclass" + end + + def reset_after_tests + #does nothing, can be overridden by adapters that want to support testing scenarios end def stop if @contexts ctxs = @contexts