Sha256: 92bbb7f3f465377b70e6ffc403ae24604ffe7db9e159371383f588117988108b

Contents?: true

Size: 466 Bytes

Versions: 46

Compression:

Stored size: 466 Bytes

Contents

require 'minitest/autorun'
require_relative '../lib/twiglet/message'

describe Twiglet::Message do
  it 'returns a message hash from a string' do
    assert_equal Twiglet::Message.new('hello, world'), { message: 'hello, world' }
  end

  it 'returns a message hash with symbolized keys' do
    input_message = { 'key' => 'value', 'message' => 'hello, world' }
    assert_equal Twiglet::Message.new(input_message), { key: 'value', message: 'hello, world' }
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
twiglet-3.13.5 test/message_test.rb
twiglet-3.13.4 test/message_test.rb
twiglet-3.13.0 test/message_test.rb
twiglet-3.12.0 test/message_test.rb
twiglet-3.11.0 test/message_test.rb
twiglet-3.10.0 test/message_test.rb
twiglet-3.9.2 test/message_test.rb
twiglet-3.9.1 test/message_test.rb
twiglet-3.9.0 test/message_test.rb
twiglet-3.8.0 test/message_test.rb
twiglet-3.7.2 test/message_test.rb
twiglet-3.7.1 test/message_test.rb
twiglet-3.7.0 test/message_test.rb
twiglet-3.6.6 test/message_test.rb
twiglet-3.6.5 test/message_test.rb
twiglet-3.6.4 test/message_test.rb
twiglet-3.6.3 test/message_test.rb
twiglet-3.6.2 test/message_test.rb
twiglet-3.6.1 test/message_test.rb
twiglet-3.6.0 test/message_test.rb