Sha256: b0bfbf7f89660f9666310bf8570e4011881074d237fb0833138fc40b39acb384

Contents?: true

Size: 574 Bytes

Versions: 3

Compression:

Stored size: 574 Bytes

Contents

require 'spec_helper'
require 'stringio'

describe Vx::Lib::Message do

  %w{ PerformJob JobLog JobStatus }.each do |klass|

    context "#{klass}" do

      let(:inst) { described_class.const_get klass }
      subject { inst.test_message }

      it "should be valid" do
        expect(subject.validate!).to be
      end

      it "should be successfuly serialized/deserialized" do
        bytes = subject.encode
        obj = described_class.const_get(klass).decode(bytes)
        expect(obj.validate!).to be
        expect(obj).to eq subject
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
vx-lib-message-0.6.5 spec/lib/message_spec.rb
vx-lib-message-0.6.4 spec/lib/message_spec.rb
vx-message-0.6.3 spec/lib/message_spec.rb