@@ -15,7 +15,7 @@ def test_remove
1515 key2: value2
1616
1717 child:
18- $mref : "#/base"
18+ $inherits : "#/base"
1919 $remove: key2
2020 key3: value3
2121 YAML
@@ -36,7 +36,7 @@ def test_multiple_remove
3636 key3: value3
3737
3838 child:
39- $mref : "#/base"
39+ $inherits : "#/base"
4040 $remove:
4141 - key2
4242 - key3
@@ -51,20 +51,20 @@ def test_multiple_remove
5151 assert_equal ( { "key1" => "value1" , "key4" => "value4" } , doc [ "child" ] )
5252 end
5353
54- def test_that_mref_with_nested_replace_works
54+ def test_that_inherits_with_nested_replace_works
5555 yaml = <<~YAML
5656 base:
5757 key1:
5858 sub_key1: value1
5959 key2: value2
6060
6161 middle:
62- $mref : "#/base"
62+ $inherits : "#/base"
6363 key3: value3
6464 key4: value4
6565
6666 bottom:
67- $mref :
67+ $inherits :
6868 - "#/base"
6969 - "#/middle"
7070 key1:
@@ -82,19 +82,19 @@ def test_that_mref_with_nested_replace_works
8282 assert_equal ( { "key1" => { "sub_key1" => "value1" , "sub_key6" => "value6" } , "key2" => "value2_new" , "key3" => "value3" , "key4" => "value4_new" , "key5" => "value5" } , doc [ "bottom" ] )
8383 end
8484
85- def test_that_spurious_recursive_mref_works
85+ def test_that_spurious_recursive_inherits_works
8686 yaml = <<~YAML
8787 base:
8888 key1: value1
8989 key2: value2
9090
9191 middle:
92- $mref : "#/base"
92+ $inherits : "#/base"
9393 key3: value3
9494 key4: value4
9595
9696 bottom:
97- $mref :
97+ $inherits :
9898 - "#/base"
9999 - "#/middle"
100100 key2: value2_new
@@ -111,19 +111,19 @@ def test_that_spurious_recursive_mref_works
111111 assert_equal ( { "key1" => "value1" , "key2" => "value2_new" , "key3" => "value3" , "key4" => "value4_new" , "key5" => "value5" } , doc [ "bottom" ] )
112112 end
113113
114- def test_that_recursive_mref_works
114+ def test_that_recursive_inherits_works
115115 yaml = <<~YAML
116116 base:
117117 key1: value1
118118 key2: value2
119119
120120 middle:
121- $mref : "#/base"
121+ $inherits : "#/base"
122122 key3: value3
123123 key4: value4
124124
125125 bottom:
126- $mref : "#/middle"
126+ $inherits : "#/middle"
127127 key2: value2_new
128128 key4: value4_new
129129 key5: value5
@@ -138,7 +138,7 @@ def test_that_recursive_mref_works
138138 assert_equal ( { "key1" => "value1" , "key2" => "value2_new" , "key3" => "value3" , "key4" => "value4_new" , "key5" => "value5" } , doc [ "bottom" ] )
139139 end
140140
141- def test_that_nested_mref_works
141+ def test_that_nested_inherits_works
142142 yaml = <<~YAML
143143 top:
144144 base:
@@ -148,7 +148,7 @@ def test_that_nested_mref_works
148148
149149 bottom:
150150 child:
151- $mref : "#/top/base"
151+ $inherits : "#/top/base"
152152 key3: value3_new
153153 YAML
154154
@@ -160,15 +160,15 @@ def test_that_nested_mref_works
160160 assert_equal ( { "key1" => "value1" , "key2" => "value2" , "key3" => "value3_new" } , doc [ "bottom" ] [ "child" ] )
161161 end
162162
163- def test_that_mref_doesnt_delete_keys
163+ def test_that_inherits_doesnt_delete_keys
164164 yaml = <<~YAML
165165 base:
166166 key1: value1
167167 key2: value2
168168 key3: value3
169169
170170 child:
171- $mref : "#/base"
171+ $inherits : "#/base"
172172 key3: value3_new
173173 YAML
174174
@@ -180,7 +180,7 @@ def test_that_mref_doesnt_delete_keys
180180 assert_equal ( { "key1" => "value1" , "key2" => "value2" , "key3" => "value3_new" } , doc [ "child" ] )
181181 end
182182
183- def test_that_double_mref_doesnt_delete_keys
183+ def test_that_double_inherits_doesnt_delete_keys
184184 yaml = <<~YAML
185185 base1:
186186 key1: value1
@@ -193,7 +193,7 @@ def test_that_double_mref_doesnt_delete_keys
193193 key6: value6
194194
195195 child:
196- $mref :
196+ $inherits :
197197 - "#/base1"
198198 - "#/base2"
199199 key3: value3_new
@@ -274,23 +274,23 @@ def test_refs_in_the_different_document
274274 assert_equal ( { "a" => "hash" } , doc [ "obj3" ] )
275275 end
276276
277- def test_mrefs_in_the_same_document
277+ def test_inheritss_in_the_same_document
278278 yaml = <<~YAML
279279 $defs:
280280 target1: A string
281281 target2:
282282 a: hash
283283
284284 obj1:
285- $mref : "#/$defs/target2"
285+ $inherits : "#/$defs/target2"
286286
287287 obj2:
288- $mref : "#/$defs/target2"
288+ $inherits : "#/$defs/target2"
289289 a: Should take precedence
290290
291291 obj3:
292292 a: Should take precedence
293- $mref : "#/$defs/target2"
293+ $inherits : "#/$defs/target2"
294294
295295 YAML
296296
@@ -304,7 +304,7 @@ def test_mrefs_in_the_same_document
304304 assert_equal ( { "a" => "Should take precedence" } , doc [ "obj3" ] )
305305 end
306306
307- def test_mrefs_in_the_different_document
307+ def test_inheritss_in_the_different_document
308308 yaml1 = <<~YAML
309309 $defs:
310310 target1: A string
@@ -319,15 +319,15 @@ def test_mrefs_in_the_different_document
319319
320320 yaml2 = <<~YAML
321321 obj1:
322- $mref : "#{ f1_path . basename } #/$defs/target2"
322+ $inherits : "#{ f1_path . basename } #/$defs/target2"
323323
324324 obj2:
325- $mref : "#{ f1_path . basename } #/$defs/target2"
325+ $inherits : "#{ f1_path . basename } #/$defs/target2"
326326 a: Should take precedence
327327
328328 obj3:
329329 a: Should take precedence
330- $mref : "#{ f1_path . basename } #/$defs/target2"
330+ $inherits : "#{ f1_path . basename } #/$defs/target2"
331331 YAML
332332
333333 f2 = Tempfile . new ( "yml" )
@@ -340,7 +340,7 @@ def test_mrefs_in_the_different_document
340340 assert_equal ( { "a" => "Should take precedence" } , doc [ "obj3" ] )
341341 end
342342
343- def test_multi_mrefs_in_the_same_document
343+ def test_multi_inheritss_in_the_same_document
344344 yaml = <<~YAML
345345 $defs:
346346 target1:
@@ -349,7 +349,7 @@ def test_multi_mrefs_in_the_same_document
349349 a: hash
350350
351351 obj1:
352- $mref :
352+ $inherits :
353353 - "#/$defs/target1"
354354 - "#/$defs/target2"
355355
@@ -363,7 +363,7 @@ def test_multi_mrefs_in_the_same_document
363363 assert_equal ( { "a" => "hash" , "b" => "nice" } , doc [ "obj1" ] )
364364 end
365365
366- def test_that_invalid_mrefs_raise
366+ def test_that_invalid_inheritss_raise
367367 yaml = <<~YAML
368368 $defs:
369369 target1:
@@ -372,7 +372,7 @@ def test_that_invalid_mrefs_raise
372372 a: hash
373373
374374 obj1:
375- $mref : "#/path/to/nowwhere"
375+ $inherits : "#/path/to/nowwhere"
376376
377377 YAML
378378
0 commit comments