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.17.1 spec/message_spec.rb
deimos-ruby-1.17.0 spec/message_spec.rb
deimos-ruby-1.16.5 spec/message_spec.rb
deimos-ruby-1.16.4 spec/message_spec.rb
deimos-ruby-1.16.3 spec/message_spec.rb
deimos-ruby-1.16.2 spec/message_spec.rb
deimos-ruby-1.16.1 spec/message_spec.rb
deimos-ruby-1.16.0 spec/message_spec.rb
deimos-ruby-1.15.1 spec/message_spec.rb
deimos-ruby-1.15.0 spec/message_spec.rb
deimos-ruby-1.14.6 spec/message_spec.rb
deimos-ruby-1.14.5 spec/message_spec.rb
deimos-ruby-1.14.4 spec/message_spec.rb
deimos-ruby-1.14.3 spec/message_spec.rb
deimos-ruby-1.14.2 spec/message_spec.rb
deimos-ruby-1.14.1 spec/message_spec.rb
deimos-ruby-1.14.0 spec/message_spec.rb
deimos-ruby-1.13.3 spec/message_spec.rb
deimos-ruby-1.13.2 spec/message_spec.rb
deimos-ruby-1.13.1 spec/message_spec.rb