summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/interface/action.rb3
-rw-r--r--lib/puppet/interface/option_manager.rb3
-rwxr-xr-xspec/unit/interface/action_spec.rb9
-rwxr-xr-xspec/unit/interface_spec.rb8
4 files changed, 2 insertions, 21 deletions
diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb
index fe77a9658..185302b07 100644
--- a/lib/puppet/interface/action.rb
+++ b/lib/puppet/interface/action.rb
@@ -227,9 +227,8 @@ WRAPPER
end
end
- @options << option.name
-
option.aliases.each do |name|
+ @options << name
@options_hash[name] = option
end
diff --git a/lib/puppet/interface/option_manager.rb b/lib/puppet/interface/option_manager.rb
index a1f300e8e..326a91d92 100644
--- a/lib/puppet/interface/option_manager.rb
+++ b/lib/puppet/interface/option_manager.rb
@@ -26,9 +26,8 @@ module Puppet::Interface::OptionManager
end
end
- @options << option.name
-
option.aliases.each do |name|
+ @options << name
@options_hash[name] = option
end
diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb
index 3e1bd0d4c..cf8d61d51 100755
--- a/spec/unit/interface/action_spec.rb
+++ b/spec/unit/interface/action_spec.rb
@@ -171,15 +171,6 @@ describe Puppet::Interface::Action do
face.get_action(:foo).options.should =~ [:bar]
end
- it "should only list options and not aliases" do
- face = Puppet::Interface.new(:action_level_options, '0.0.1') do
- action :foo do
- option "--bar", "-b", "--foo-bar"
- end
- end
- face.get_action(:foo).options.should =~ [:bar]
- end
-
describe "with both face and action options" do
let :face do
Puppet::Interface.new(:action_level_options, '0.0.1') do
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index 4cb1f8743..8bbbcc857 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -174,14 +174,6 @@ describe Puppet::Interface do
face.get_action(:foo).options.should =~ [:quux]
face.get_action(:bar).options.should =~ [:quux]
end
-
- it "should only list options and not aliases" do
- face = subject.new(:face_options, '0.0.1') do
- option "--bar", "-b", "--foo-bar"
- end
- face.options.should =~ [:bar]
- end
-
end
describe "with inherited options" do