Sha256: 09a99d48853f42e54206497eeb6793bdcbdb02b27b6cc74d8f20587eed1803e9

Contents?: true

Size: 694 Bytes

Versions: 3

Compression:

Stored size: 694 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'rflow'))

require 'fileutils'
require 'log4r'
require 'rspec/collection_matchers'
require 'tmpdir'

I18n.enforce_available_locales = true

RSpec.configure do |config|
  config.before(:each) do
    @temp_directory_path = Dir.mktmpdir('rflow')
  end

  config.after(:each) do
    FileUtils.rm_rf @temp_directory_path
  end
end

def decode_avro(schema_string, bytes)
  schema = Avro::Schema.parse(schema_string)
  RFlow::Avro.decode(Avro::IO::DatumReader.new(schema, schema), bytes)
end

def encode_avro(schema_string, message)
  RFlow::Avro.encode(Avro::IO::DatumWriter.new(Avro::Schema.parse(schema_string)), message)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rflow-1.2.0 spec/spec_helper.rb
rflow-1.1.0 spec/spec_helper.rb
rflow-1.0.1 spec/spec_helper.rb