Sha256: 2ecd752090c596d89447d4adbb32f82949799b409de033e3bd6f774023bafaca

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

RSpec.describe Message::OK do
  let(:message_type) { Message::OK::TYPE_CODE }

  let(:string) { message_type }

  describe '.new' do
    it 'should reuse the same singleton object' do
      expect(Message::OK.new.object_id).to eq Message::OK.new.object_id
    end
  end

  describe '.parse' do
    it 'should parse correctly' do
      message = Message::OK.parse string

      expect(message).to be_a Message::OK
    end
  end

  describe '#to_s' do
    it 'should serialize correctly' do
      serialized = Message::OK.new.to_s

      expect(serialized).to eq string
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aggro-0.0.4 spec/lib/aggro/message/ok_spec.rb
aggro-0.0.3 spec/lib/aggro/message/ok_spec.rb
aggro-0.0.2 spec/lib/aggro/message/ok_spec.rb