Sha256: fc13668bb4117008a7e4f25d258cd9786362bb292d26949ff39be13702caffdb

Contents?: true

Size: 613 Bytes

Versions: 2

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper'
require 'stringio'

describe Vx::Message do

  %w{ PerformBuild PerformJob BuildLog JobLog BuildStatus 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_true
      end

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

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vx-message-0.4.1 spec/lib/message_spec.rb
vx-message-0.4.0 spec/lib/message_spec.rb