diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-06-24 16:37:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 16:37:50 +0800 |
commit | c364faf80707f963a5f7e11b364563b5934fb265 (patch) | |
tree | 209e3f77b0c8123ff7842dea5ee8ad72aeb9cd5f /test/psych/test_psych.rb | |
parent | 7b1201209a658e6e45aa3fc85b56dc8f61aa4fb1 (diff) | |
parent | cbef14d4f18a56cbc9e1c7d9bcdbcf5dc6510a68 (diff) | |
download | psych-c364faf80707f963a5f7e11b364563b5934fb265.tar.gz |
Merge pull request #264 from tuexss/load_file-default
Add optional fallback return value parameter
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r-- | test/psych/test_psych.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 7de9e07..508519b 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -144,6 +144,11 @@ class TestPsych < Psych::TestCase } end + def test_load_file_with_fallback + t = Tempfile.create(['empty', 'yml']) + assert_equal Hash.new, Psych.load_file(t.path, Hash.new) + end + def test_parse_file Tempfile.create(['yikes', 'yml']) {|t| t.binmode |