test/sysv_mq_test.rb in sysvmq-0.2.0 vs test/sysv_mq_test.rb in sysvmq-0.2.1
- old
+ new
@@ -1,5 +1,6 @@
+#coding: utf-8
require_relative 'test_helper'
class SysVMQTest < MiniTest::Unit::TestCase
def setup
@size = 1024
@@ -50,10 +51,10 @@
end
def test_sending_utf_should_report_correct_size_queue
message = "ø" * 5
@mq.send message
- assert_equal "ø".bytes.size * 5, @mq.stats[:size]
+ assert_equal "ø".bytes.to_a.size * 5, @mq.stats[:size]
end
def test_receive_on_empty_queue_raises_enomsg_if_ipc_nowait
assert_raises Errno::ENOMSG do
@mq.receive(0, SysVMQ::IPC_NOWAIT)