diff options
| author | Daniel Bovensiepen <[email protected]> | 2013-08-04 22:41:15 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2013-08-04 22:41:15 +0800 |
| commit | b4e07a805192cf3fedb72bbe04137fdafa5e8133 (patch) | |
| tree | 25645a2a319b8188027c2a687c8f1281c34f6d67 | |
| parent | f96c02327943c6f16da79bd67e40624e2fa7b4bb (diff) | |
| download | mruby-b4e07a805192cf3fedb72bbe04137fdafa5e8133.tar.gz mruby-b4e07a805192cf3fedb72bbe04137fdafa5e8133.zip | |
Improve test of mruby-hash-ext GEM
| -rw-r--r-- | mrbgems/mruby-hash-ext/test/hash.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mrbgems/mruby-hash-ext/test/hash.rb b/mrbgems/mruby-hash-ext/test/hash.rb index 73e12d8f2..40f6ac8bf 100644 --- a/mrbgems/mruby-hash-ext/test/hash.rb +++ b/mrbgems/mruby-hash-ext/test/hash.rb @@ -12,15 +12,13 @@ assert('Hash#merge!') do original end - result_1 == {'abc_key' => 'abc_value', 'cba_key' => 'XXX', - 'xyz_key' => 'xyz_value' } and - result_2 == {'abc_key' => 'abc_value', 'cba_key' => 'cba_value', - 'xyz_key' => 'xyz_value' } + assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'XXX', + 'xyz_key' => 'xyz_value' }, result_1) + assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'cba_value', + 'xyz_key' => 'xyz_value' }, result_2) end assert('Hash#values_at') do h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" } - result = h.values_at("cow", "cat") - - result == ["bovine", "feline"] + assert_equal ["bovine", "feline"], h.values_at("cow", "cat") end |
