diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-04 09:35:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-04 09:35:20 -0800 |
commit | cf32a59ed6134d417503448c951b137aeceba81d (patch) | |
tree | b2d0b21f0796ca39d598579a5bc5996204e8cf08 /activesupport/test | |
parent | e094b8d251550128a2986b9efed7ab725b439546 (diff) | |
parent | 7d26fad384a99aea27e478474f5b8d24ae33b704 (diff) | |
download | rails-cf32a59ed6134d417503448c951b137aeceba81d.tar.gz rails-cf32a59ed6134d417503448c951b137aeceba81d.tar.bz2 rails-cf32a59ed6134d417503448c951b137aeceba81d.zip |
Merge pull request #4298 from rafaelfranca/patch-2
Remove rescue block to require psych gem
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/ordered_hash_test.rb | 21 | ||||
-rw-r--r-- | activesupport/test/safe_buffer_test.rb | 5 |
2 files changed, 8 insertions, 18 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 diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index 8d9911ea01..2fde07995b 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -1,9 +1,4 @@ require 'abstract_unit' -begin - require 'psych' -rescue LoadError -end - require 'active_support/core_ext/string/inflections' require 'yaml' |