diff options
| author | Luke Kanies <luke@reductivelabs.com> | 2010-01-30 23:36:32 -0600 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 9c867e6d79dcc56cd34683c9a339dc729ad2d291 (patch) | |
| tree | 27ee2a51648d11891a5168db1e63e064244eeef5 /test/util | |
| parent | 274d1c5e78250640b8d2c40201ca2586c0088f32 (diff) | |
| download | puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.tar.gz puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.tar.xz puppet-9c867e6d79dcc56cd34683c9a339dc729ad2d291.zip | |
Fixing most of the broken tests in test/
This involves a bit of refactoring in the rest
of the code to make it all work, but most of the
changes are fixing or removing old tests.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'test/util')
| -rwxr-xr-x | test/util/settings.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/util/settings.rb b/test/util/settings.rb index 1e8eb4864..a080ca03b 100755 --- a/test/util/settings.rb +++ b/test/util/settings.rb @@ -78,10 +78,8 @@ class TestSettings < Test::Unit::TestCase end def mkconfig - c = nil - assert_nothing_raised { - c = Puppet::Util::Settings.new - } + c = Puppet::Util::Settings.new + c.setdefaults :main, :noop => [false, "foo"] return c end @@ -303,6 +301,8 @@ yay = /a/path end def test_addargs_functional + @config = Puppet::Util::Settings.new + @config.setdefaults("testing", :onboolean => [true, "An on bool"], :string => ["a string", "A string arg"] @@ -666,15 +666,15 @@ yay = /a/path end # Test to make sure that we can set and get a short name - def test_celement_short_name - element = nil - assert_nothing_raised("Could not create celement") do - element = Setting.new :short => "n", :desc => "anything", :settings => Puppet::Util::Settings.new + def test_setting_short_name + setting= nil + assert_nothing_raised("Could not create setting") do + setting= Setting.new :short => "n", :desc => "anything", :settings => Puppet::Util::Settings.new end - assert_equal("n", element.short, "Short value is not retained") + assert_equal("n", setting.short, "Short value is not retained") assert_raise(ArgumentError,"Allowed multicharactered short names.") do - element = Setting.new :short => "no", :desc => "anything", :settings => Puppet::Util::Settings.new + setting= Setting.new :short => "no", :desc => "anything", :settings => Puppet::Util::Settings.new end end |
