spec/lib/ruby-conf_spec.rb in ruby-conf-2.6.3 vs spec/lib/ruby-conf_spec.rb in ruby-conf-2.6.4
- old
+ new
@@ -59,21 +59,28 @@
inner do
val value
end
end
end
- other do
+ inherit do
val "val"
+ ival ->{ self.val }
+ end
+
+ other(inherits:inherit) do
inner do
value "correct"
end
self_refa ->{ self.inner.value }
- self_refb ->{ self.val }
+ self_refb ->{ self.ival }
end
end
other = RootTest.other.detach
+ other.val.should == "val"
+ other.ival.should == "val"
+
other.inner.value.should == "correct"
other.self_refa.should == "correct"
other.self_refb.should == "val"
RootTest.outer.middle.inner.val.should == "value"
@@ -479,9 +486,10 @@
RubyConf.define do
foo { ident "correct" }
bar { ident "wrong" }
end
RUBY_CONF.ident.should == "correct"
+ RUBY_CONF.__rc_parent.should be_nil
RubyConf.clear
RUBY_CONF.should be_nil
RubyConf.define do
foo_conf { ident "correct" }