summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Momchilov <alexander.momchilov@shopify.com>2022-07-22 16:16:04 -0400
committerAlexander Momchilov <alexander.momchilov@shopify.com>2022-07-27 15:25:26 -0400
commit98fbd5247a1727230ec3c0d459d24fd07f5d2bd4 (patch)
treea0c33f3581527a7a207a303e66eb4fd71081b5ee /test
parent42b43de997f9c19dbd9f204f4399c02e74a4bf03 (diff)
downloadpsych-98fbd5247a1727230ec3c0d459d24fd07f5d2bd4.tar.gz
Raise specific error when an anchor isn't defined
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_hash.rb2
-rw-r--r--test/psych/test_merge_keys.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/psych/test_hash.rb b/test/psych/test_hash.rb
index 88b520e..31eba85 100644
--- a/test/psych/test_hash.rb
+++ b/test/psych/test_hash.rb
@@ -124,7 +124,7 @@ module Psych
end
def test_raises_if_anchor_not_defined
- assert_raise(Psych::BadAlias) do
+ assert_raise(Psych::AnchorNotDefined) do
Psych.unsafe_load(<<~eoyml)
---
foo: &foo
diff --git a/test/psych/test_merge_keys.rb b/test/psych/test_merge_keys.rb
index 8d2fcea..2f55a1e 100644
--- a/test/psych/test_merge_keys.rb
+++ b/test/psych/test_merge_keys.rb
@@ -117,7 +117,7 @@ development:
bar:
<< : *foo
eoyml
- exp = assert_raise(Psych::BadAlias) { Psych.load(yaml, aliases: true) }
+ exp = assert_raise(Psych::AnchorNotDefined) { Psych.load(yaml, aliases: true) }
assert_match 'foo', exp.message
end