Sha256: 3ba3e98e38155115b993896a56ab8be16870ea2b05c73fd234ae99fa69c78ebc
Contents?: true
Size: 714 Bytes
Versions: 8
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true require 'basquiat/adapters/rabbitmq_adapter' RSpec.describe Basquiat::Adapters::RabbitMq::Message do let(:json) do { key: 'value', date: Date.new.iso8601 }.to_json end subject(:message) { Basquiat::Adapters::RabbitMq::Message.new(json) } it 'delegates all calls to message hash' do expect(message[:key]).to eq('value') end it 'can be JSONified' do expect(MultiJson.dump(message)).to eq(json) end it 'exposes the delivery information' do expect { message.di }.to_not raise_error expect { message.delivery_info }.to_not raise_error end it 'exposes the properties of the message' do expect { message.props }.to_not raise_error end end
Version data entries
8 entries across 8 versions & 1 rubygems