spec/spec_helper.rb in deimos-ruby-1.11.2 vs spec/spec_helper.rb in deimos-ruby-1.12.0
- old
+ new
@@ -11,11 +11,15 @@
require 'active_support/testing/time_helpers'
require 'activerecord-import'
require 'handlers/my_batch_consumer'
require 'handlers/my_consumer'
require 'rspec/rails'
+Dir['./spec/schema_classes/**/*.rb'].sort.each { |f| require f }
+# Constants used for consumer specs
+SCHEMA_CLASS_SETTINGS = { off: false, on: true }.freeze
+
class DeimosApp < Rails::Application
end
DeimosApp.initialize!
# Helpers for Executor/DbProducer
@@ -98,11 +102,11 @@
# For each config, run some tests.
def each_db_config(subject, &block)
DB_OPTIONS.each do |options|
describe subject, :integration, db_config: options do
- include_context 'with DB'
+ include_context('with DB')
describe options[:adapter] do # rubocop:disable RSpec/EmptyExampleGroup
self.instance_eval(&block)
end
end
end
@@ -190,9 +194,10 @@
deimos_config.schema.registry_url = ENV['SCHEMA_REGISTRY'] || 'http://localhost:8081'
deimos_config.kafka.seed_brokers = ENV['KAFKA_SEED_BROKER'] || 'localhost:9092'
deimos_config.logger = Logger.new('/dev/null')
deimos_config.logger.level = Logger::INFO
deimos_config.schema.backend = :avro_validation
+ deimos_config.schema.generated_class_path = 'spec/schema_classes'
end
end
config.around(:each) do |example|
use_cleaner = !example.metadata[:integration]