summaryrefslogtreecommitdiffstats
path: root/test/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/util')
-rwxr-xr-xtest/util/settings.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/util/settings.rb b/test/util/settings.rb
index de6fff946..94b01c80e 100755
--- a/test/util/settings.rb
+++ b/test/util/settings.rb
@@ -995,12 +995,12 @@ yay = /a/path
def test_celement_short_name
element = nil
assert_nothing_raised("Could not create celement") do
- element = CElement.new :short => "n", :desc => "anything"
+ element = CElement.new :short => "n", :desc => "anything", :settings => Puppet::Util::Settings.new
end
assert_equal("n", element.short, "Short value is not retained")
assert_raise(ArgumentError,"Allowed multicharactered short names.") do
- element = CElement.new :short => "no", :desc => "anything"
+ element = CElement.new :short => "no", :desc => "anything", :settings => Puppet::Util::Settings.new
end
end
@@ -1025,13 +1025,13 @@ yay = /a/path
# Tell getopt which arguments are valid
def test_get_getopt_args
- element = CElement.new :name => "foo", :desc => "anything"
+ element = CElement.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new
assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")
element.short = "n"
assert_equal([["--foo", "-n", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")
- element = CBoolean.new :name => "foo", :desc => "anything"
+ element = CBoolean.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new
assert_equal([["--foo", GetoptLong::NO_ARGUMENT], ["--no-foo", GetoptLong::NO_ARGUMENT]],
element.getopt_args, "Did not produce appropriate getopt args")