lib/deimos/test_helpers.rb in deimos-ruby-1.3.0.pre.beta5 vs lib/deimos/test_helpers.rb in deimos-ruby-1.4.0.pre.beta1

- old
+ new

@@ -59,11 +59,10 @@ if schema && decoder.namespace # Validate against local schema. encoder = Deimos::AvroDataEncoder.new(schema: schema, namespace: decoder.namespace) encoder.schema_store = decoder.schema_store - payload = payload.respond_to?(:stringify_keys) ? payload.stringify_keys : payload encoder.encode_local(payload) end payload end allow(decoder).to receive(:decode_key) do |payload, _key_id| @@ -75,13 +74,12 @@ RSpec.configure do |config| config.before(:suite) do Deimos.configure do |fr_config| fr_config.logger = Logger.new(STDOUT) - fr_config.seed_broker ||= 'test_broker' - fr_config.tracer = Deimos::Tracing::Mock.new - fr_config.metrics = Deimos::Metrics::Mock.new + fr_config.consumers.reraise_errors = true + fr_config.kafka.seed_brokers ||= ['test_broker'] end end end before(:each) do @@ -466,15 +464,9 @@ # Stub shared methods between consumers/batch consumers # @param [Class < Deimos::BaseConsumer] klass Consumer class to stub def _stub_base_consumer(klass) allow(klass).to receive(:decoder) do create_decoder(klass.config[:schema], klass.config[:namespace]) - end - - if klass.config[:key_schema] # rubocop:disable Style/GuardClause - allow(klass).to receive(:key_decoder) do - create_decoder(klass.config[:key_schema], klass.config[:namespace]) - end end end end end