diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2011-02-22 17:38:04 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@puppetlabs.com> | 2011-02-22 17:38:04 -0800 |
| commit | 368210e8a8a35cf2cae509b1d357337f9958cdff (patch) | |
| tree | be61ef9b3e9b9f2d2c76cba8d40e67194245929e /spec/unit/interface | |
| parent | c2715c0f20d916de0284e2d161eb5de32e508244 (diff) | |
| download | puppet-368210e8a8a35cf2cae509b1d357337f9958cdff.tar.gz puppet-368210e8a8a35cf2cae509b1d357337f9958cdff.tar.xz puppet-368210e8a8a35cf2cae509b1d357337f9958cdff.zip | |
Adding a simple "config" app
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec/unit/interface')
| -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 |
