aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/tests/basic.rb
diff options
context:
space:
mode:
authorGravatar Adam Greene <adam.greene@gmail.com>2015-05-03 20:42:11 -0700
committerGravatar Adam Greene <adam.greene@gmail.com>2015-05-14 10:38:11 -0700
commitcd7ebbe54f16999b74c2c32a64336bad131ec5f3 (patch)
treead8be4705dbdbc6d88a433948195ee84480969eb /ruby/tests/basic.rb
parent5bd8b680bad38ef40b838ce0de05aac5465d04c0 (diff)
make repeated_field quack like an array
Diffstat (limited to 'ruby/tests/basic.rb')
-rw-r--r--ruby/tests/basic.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb
index a00f0b05..b6e26108 100644
--- a/ruby/tests/basic.rb
+++ b/ruby/tests/basic.rb
@@ -178,7 +178,7 @@ module BasicTest
:optional_msg => TestMessage2.new,
:repeated_string => ["hello", "there", "world"])
expected = '<BasicTest::TestMessage: optional_int32: -42, optional_int64: 0, optional_uint32: 0, optional_uint64: 0, optional_bool: false, optional_float: 0.0, optional_double: 0.0, optional_string: "", optional_bytes: "", optional_msg: <BasicTest::TestMessage2: foo: 0>, optional_enum: :A, repeated_int32: [], repeated_int64: [], repeated_uint32: [], repeated_uint64: [], repeated_bool: [], repeated_float: [], repeated_double: [], repeated_string: ["hello", "there", "world"], repeated_bytes: [], repeated_msg: [], repeated_enum: []>'
- assert m.inspect == expected
+ assert_equal expected, m.inspect
end
def test_hash
@@ -276,7 +276,7 @@ module BasicTest
assert l.inspect == '[5, 2, 3, 4]'
- l.insert(7, 8, 9)
+ l.concat([7, 8, 9])
assert l == [5, 2, 3, 4, 7, 8, 9]
assert l.pop == 9
assert l == [5, 2, 3, 4, 7, 8]