diff options
Diffstat (limited to 'spec/unit/interface/config_spec.rb')
| -rw-r--r-- | spec/unit/interface/config_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/unit/interface/config_spec.rb b/spec/unit/interface/config_spec.rb new file mode 100644 index 000000000..79c65f2ac --- /dev/null +++ b/spec/unit/interface/config_spec.rb @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby + +require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') +require 'puppet/interface/config' + +describe Puppet::Interface.interface(:config) do + before do + @interface = Puppet::Interface.interface(:config) + end + + it "should be a subclass of 'Indirection'" do + @interface.should be_instance_of(Puppet::Interface) + end + + it "should use Settings#print_config_options when asked to print" do + Puppet.settings.stubs(:puts) + Puppet.settings.expects(:print_config_options) + @interface.print + end + + it "should set 'configprint' to all desired values and call print_config_options when a specific value is provided" do + Puppet.settings.stubs(:puts) + Puppet.settings.expects(:print_config_options) + @interface.print("libdir", "ssldir") + Puppet.settings[:configprint].should == "libdir,ssldir" + end +end |
