Sha256: 1ca82d16afbeb595bd773ac183375e2123e189af36a105b1a2be8c5e4aaa2b90

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

require 'spec_helper.rb'

require 'rflow/components/raw'

describe 'RFlow::Message::Data::Raw Avro Schema' do
  before(:each) do
    @schema_string = RFlow::Configuration.available_data_types['RFlow::Message::Data::Raw']['avro']
  end

  it "should load the schema" do
    @schema_string.should_not == nil
  end

  it "should encode and decode an object" do
    raw = {'raw' => 'rawdata'}

    expect {encode_avro(@schema_string, raw)}.to_not raise_error
    avro_encoded_raw = encode_avro(@schema_string, raw)

    expect {decode_avro(@schema_string, avro_encoded_raw)}.to_not raise_error
    decoded_raw = decode_avro(@schema_string, avro_encoded_raw)

    decoded_raw.should == raw
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rflow-1.0.0a1 spec/rflow_message_data_raw.rb