test/test_configlet.rb in configlet-1.0.0 vs test/test_configlet.rb in configlet-1.1.0
- old
+ new
@@ -16,9 +16,20 @@
Configlet.default :foo => "bar"
assert_equal "bar", Configlet["foo"]
end
+ def test_for
+ ENV["PREFIX_FOO"] = "bar"
+
+ Configlet.for :prefix do
+ default :bar => "baz"
+ end
+
+ assert_equal "bar", Configlet[:foo]
+ assert_equal "baz", Configlet[:bar]
+ end
+
def test_get
ENV["FOO"] = "bar"
assert_equal "bar", Configlet[:foo]
Configlet.prefix = "boom"