summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-09-13 12:19:00 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-09-13 12:19:00 -0700
commitda87bfb4ab5e7a55c84d7f13c0e7a5f1d0a5e0b3 (patch)
treec54f0e103739585e9a2178a7a207e0845fc0a02c
parentfa58c6904f7b515005e8044862fd837fb642c68b (diff)
downloadmixlib-config-da87bfb4ab5e7a55c84d7f13c0e7a5f1d0a5e0b3.tar.gz
Make reset doc more pleasant to read
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index ed92d3c..b9db25d 100644
--- a/README.md
+++ b/README.md
@@ -120,9 +120,9 @@ In conclusion: *always set config_strict_mode to true*. You know you want to.
## Testing and Reset ##
-If your app is configured with Mixlib::Config, testing options becomes easy! Simply call `MyConfig.reset` before each test and all configuration will be reset to its default value. There's no need to explicitly unset all your options between each run.
+Testing your application with different sets of arguments can by simplified with `reset`. Call `MyConfig.reset` before each test and all configuration will be reset to its default value. There's no need to explicitly unset all your options between each run.
-NOTE: resetting objects, arrays and hashes to their defaults is a little tricky because the original value can be mutated with `MyConfig.array_option << 'x'` adding 'x' to the array. We strive to truly reset values, calling `dup` on default values on first use to prevent the original default value being changed. However, because of how `dup` works, nested arrays and nested hashes won't reset all children. If you have arrays of objects, arrays of arrays, or other deep nesting, we suggest you use code blocks to set up your default values (`default(:option) { [ [ 1, 2 ], [ 3, 4 ] ] }`).
+NOTE: if you have arrays of arrays, or other deep nesting, we suggest you use code blocks to set up your default values (`default(:option) { [ [ 1, 2 ], [ 3, 4 ] ] }`). Deep children will not always be reset to their default values.
Report bugs [here](https://tickets.opscode.com).