diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-01 21:36:00 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-01 21:36:00 +0000 |
| commit | 457492836e092374895122e69fa067299bf112ff (patch) | |
| tree | 3a34921cec82b75f7f76ec68414659158af245f6 /test | |
| parent | 6d8a1dc1af819950e5c8edf1b70acefd540d3695 (diff) | |
Intermediate commit; setdefaults now accepts both hashes and arrays
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@961 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/other/config.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/other/config.rb b/test/other/config.rb index 276dcf2f3..3dc692a0d 100755 --- a/test/other/config.rb +++ b/test/other/config.rb @@ -1,3 +1,5 @@ +#!/usr/bin/env ruby + if __FILE__ == $0 $:.unshift '..' $:.unshift '../../lib' @@ -335,6 +337,28 @@ yay = /a/path end } end + + def test_usesection + c = mkconfig + + dir = tempfile() + file = "$mydir/myfile" + realfile = File.join(dir, "myfile") + section = "testing" + assert_nothing_raised { + c.setdefaults(section, + [:mydir, dir, "A dir arg"], + [:myfile, file, "A file arg"] + ) + } + + assert_nothing_raised("Could not use a section") { + c.use(section) + } + + assert(FileTest.directory?(dir), "Did not create directory") + assert(!FileTest.exists?(realfile), "Created file") + end end # $Id$ |
