test/sysv_mq_test.rb in sysvmq-0.2.1 vs test/sysv_mq_test.rb in sysvmq-0.2.2
- old
+ new
@@ -128,6 +128,20 @@
def test_null_bytes
message = "\x00omg\x00omg"
@mq.send(message)
assert_equal message, @mq.receive
end
+
+ def test_number_converted_to_string
+ message = 1
+ @mq.send(message)
+ assert_equal "1", @mq.receive
+ end
+
+ class Walrus; def to_s; "walrus"; end; end
+
+ def test_object_converted_to_string
+ message = Walrus.new
+ @mq.send(message)
+ assert_equal "walrus", @mq.receive
+ end
end