summaryrefslogtreecommitdiffstats
path: root/spec/unit/application/certificate_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/application/certificate_spec.rb')
-rwxr-xr-xspec/unit/application/certificate_spec.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/spec/unit/application/certificate_spec.rb b/spec/unit/application/certificate_spec.rb
index 6666f54f7..3d2215ded 100755
--- a/spec/unit/application/certificate_spec.rb
+++ b/spec/unit/application/certificate_spec.rb
@@ -4,13 +4,17 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
require 'puppet/application/certificate'
describe Puppet::Application::Certificate do
- it "should be a subclass of Puppet::Application::IndirectionBase" do
- Puppet::Application::Certificate.superclass.should equal(
- Puppet::Application::IndirectionBase
- )
+ it "should have a 'ca-location' option" do
+ # REVISIT: This is delegated from the string, and we will have a test
+ # there, so is this actually a valuable test?
+ subject.command_line.stubs(:args).returns %w{list}
+ subject.preinit
+ subject.should respond_to(:handle_ca_location)
end
- it "should have a 'ca' option" do
- Puppet::Application::Certificate.new.should respond_to(:handle_ca_location)
+ it "should accept the ca-location option" do
+ subject.command_line.stubs(:args).returns %w{--ca-location local list}
+ subject.preinit and subject.parse_options and subject.setup
+ subject.arguments.should == [{ :ca_location => "local" }]
end
end