aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/ordered_hash_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/ordered_hash_test.rb')
-rw-r--r--activesupport/test/ordered_hash_test.rb21
1 files changed, 8 insertions, 13 deletions
diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb
index 8119b36491..78de7fb6ab 100644
--- a/activesupport/test/ordered_hash_test.rb
+++ b/activesupport/test/ordered_hash_test.rb
@@ -291,21 +291,16 @@ class OrderedHashTest < Test::Unit::TestCase
assert_equal @ordered_hash.values, @deserialized_ordered_hash.values
end
- begin
- require 'psych'
+ def test_psych_serialize
+ @deserialized_ordered_hash = Psych.load(Psych.dump(@ordered_hash))
- def test_psych_serialize
- @deserialized_ordered_hash = Psych.load(Psych.dump(@ordered_hash))
-
- values = @deserialized_ordered_hash.map { |_, value| value }
- assert_equal @values, values
- end
+ values = @deserialized_ordered_hash.map { |_, value| value }
+ assert_equal @values, values
+ end
- def test_psych_serialize_tag
- yaml = Psych.dump(@ordered_hash)
- assert_match '!omap', yaml
- end
- rescue LoadError
+ def test_psych_serialize_tag
+ yaml = Psych.dump(@ordered_hash)
+ assert_match '!omap', yaml
end
def test_has_yaml_tag