Sha256: cf09cb2479066e7ed5ba1c09a6549f5493d9866aafc603a615445c896b6d9b57

Contents?: true

Size: 614 Bytes

Versions: 83

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

RSpec.describe(Deimos::Message) do
  it 'should detect tombstones' do
    expect(described_class.new(nil, nil, key: 'key1')).
      to be_tombstone
    expect(described_class.new({ v: 'val1' }, nil, key: 'key1')).
      not_to be_tombstone
    expect(described_class.new({ v: '' }, nil, key: 'key1')).
      not_to be_tombstone
    expect(described_class.new({ v: 'val1' }, nil, key: nil)).
      not_to be_tombstone
  end

  it 'can support complex keys/values' do
    expect { described_class.new({ a: 1, b: 2 }, nil, key: { c: 3, d: 4 }) }.
      not_to raise_exception
  end
end

Version data entries

83 entries across 83 versions & 2 rubygems

Version Path
deimos-ruby-1.22.3 spec/message_spec.rb
deimos-ruby-1.22.2 spec/message_spec.rb
deimos-ruby-1.22.1 spec/message_spec.rb
deimos-ruby-1.22 spec/message_spec.rb
deimos-ruby-1.20.1 spec/message_spec.rb
deimos-ruby-1.20.0 spec/message_spec.rb
deimos-ruby-1.19.7 spec/message_spec.rb
deimos-ruby-1.19.6 spec/message_spec.rb
deimos-ruby-1.19.5 spec/message_spec.rb
deimos-ruby-1.19.4 spec/message_spec.rb
deimos-ruby-1.19.3 spec/message_spec.rb
deimos-ruby-1.19.2 spec/message_spec.rb
deimos-ruby-1.19.1 spec/message_spec.rb
deimos-ruby-1.19.1.pre.beta1 spec/message_spec.rb
deimos-ruby-1.19.0 spec/message_spec.rb
deimos-ruby-1.19.beta2 spec/message_spec.rb
deimos-ruby-1.19.beta1 spec/message_spec.rb
deimos-ruby-1.18.2 spec/message_spec.rb
deimos-ruby-1.18.1 spec/message_spec.rb
deimos-ruby-1.18.0 spec/message_spec.rb