Sha256: fbb470a0795a992ee652d066a11b4a956b039523af522e02977f205194fdbb50

Contents?: true

Size: 706 Bytes

Versions: 3

Compression:

Stored size: 706 Bytes

Contents

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

  let(:string) { message_type }

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

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

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

  describe '#to_s' do
    it 'should serialize correctly' do
      serialized = Message::UnhandledOperation.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/unhandled_operation_spec.rb
aggro-0.0.3 spec/lib/aggro/message/unhandled_operation_spec.rb
aggro-0.0.2 spec/lib/aggro/message/unhandled_operation_spec.rb