diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-26 02:52:46 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-26 02:52:46 +0000 |
commit | 46724873b0daf109d7f249a6ca768bdb938c00da (patch) | |
tree | 9893eb0353d8c236bc335df5211551e5b45b233c /test/psych/test_engine_manager.rb | |
parent | 94a6e6f6e1ab035207efb94b1f77341cd21ee4b3 (diff) | |
download | ruby-46724873b0daf109d7f249a6ca768bdb938c00da.tar.gz |
Revert "Revert "* lib/yaml.rb: Remove Psych::EngineManager [Bug #8344]""
syck-1.0.3 gem support this imcompatible changes.
This reverts commit r46102
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_engine_manager.rb')
-rw-r--r-- | test/psych/test_engine_manager.rb | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/test/psych/test_engine_manager.rb b/test/psych/test_engine_manager.rb deleted file mode 100644 index 33a67432eb..0000000000 --- a/test/psych/test_engine_manager.rb +++ /dev/null @@ -1,47 +0,0 @@ -require_relative 'helper' -require 'yaml' - -module Psych - class TestEngineManager < TestCase - def test_bad_engine - assert_raises(ArgumentError) do - YAML::ENGINE.yamler = 'foooo' - end - end - - def test_set_psych - YAML::ENGINE.yamler = 'psych' - assert_equal Psych, YAML - assert_equal 'psych', YAML::ENGINE.yamler - end - - A = Struct.new(:name) - - def test_dump_types - YAML::ENGINE.yamler = 'psych' - - assert_to_yaml ::Object.new - assert_to_yaml Time.now - assert_to_yaml Date.today - assert_to_yaml('a' => 'b') - assert_to_yaml A.new('foo') - assert_to_yaml %w{a b} - assert_to_yaml Exception.new('foo') - assert_to_yaml "hello!" - assert_to_yaml :fooo - assert_to_yaml(1..10) - assert_to_yaml(/hello!~/) - assert_to_yaml 1 - assert_to_yaml 1.2 - assert_to_yaml Rational(1, 2) - assert_to_yaml Complex(1, 2) - assert_to_yaml true - assert_to_yaml false - assert_to_yaml nil - end - - def assert_to_yaml obj - assert obj.to_yaml, "#{obj.class} to_yaml works" - end - end -end |