summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r--test/psych/test_psych.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index bce6bf8..8f9a100 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -156,6 +156,13 @@ class TestPsych < Psych::TestCase
}
end
+ def test_load_file_with_fallback_nil_or_false
+ Tempfile.create(['empty', 'yml']) {|t|
+ assert_nil Psych.load_file(t.path, fallback: nil)
+ assert_equal false, Psych.load_file(t.path, fallback: false)
+ }
+ end
+
def test_load_file_with_fallback_hash
Tempfile.create(['empty', 'yml']) {|t|
assert_equal Hash.new, Psych.load_file(t.path, fallback: Hash.new)