summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_yamldbm.rb8
-rw-r--r--test/syck/test_yamldbm.rb8
2 files changed, 8 insertions, 8 deletions
diff --git a/test/psych/test_yamldbm.rb b/test/psych/test_yamldbm.rb
index c60a18febe9..5fd2d77ed6f 100644
--- a/test/psych/test_yamldbm.rb
+++ b/test/psych/test_yamldbm.rb
@@ -48,7 +48,7 @@ module Psych
def test_to_a
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal([['a','b'],['c','d']], @yamldbm.to_a)
+ assert_equal([['a','b'],['c','d']], @yamldbm.to_a.sort)
end
def test_to_hash
@@ -97,8 +97,8 @@ module Psych
def test_shift
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal(['a','b'], @yamldbm.shift)
- assert_equal(['c','d'], @yamldbm.shift)
+ assert_equal([['a','b'], ['c','d']],
+ [@yamldbm.shift, @yamldbm.shift].sort)
assert_nil @yamldbm.shift
end
@@ -166,7 +166,7 @@ module Psych
assert_equal [], @yamldbm.values
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal ['b','d'], @yamldbm.values
+ assert_equal ['b','d'], @yamldbm.values.sort
end
def test_values_at
diff --git a/test/syck/test_yamldbm.rb b/test/syck/test_yamldbm.rb
index a4a3afb66af..a736f20a337 100644
--- a/test/syck/test_yamldbm.rb
+++ b/test/syck/test_yamldbm.rb
@@ -48,7 +48,7 @@ module Syck
def test_to_a
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal([['a','b'],['c','d']], @yamldbm.to_a)
+ assert_equal([['a','b'],['c','d']], @yamldbm.to_a.sort)
end
def test_to_hash
@@ -97,8 +97,8 @@ module Syck
def test_shift
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal(['a','b'], @yamldbm.shift)
- assert_equal(['c','d'], @yamldbm.shift)
+ assert_equal([['a','b'], ['c','d']],
+ [@yamldbm.shift, @yamldbm.shift].sort)
assert_nil @yamldbm.shift
end
@@ -166,7 +166,7 @@ module Syck
assert_equal [], @yamldbm.values
@yamldbm['a'] = 'b'
@yamldbm['c'] = 'd'
- assert_equal ['b','d'], @yamldbm.values
+ assert_equal ['b','d'], @yamldbm.values.sort
end
def test_values_at