Sha256: 5152ac3b4364a539bbc51ddcbb4f78d5d04e80b895bca0c0479511e6398409a2

Contents?: true

Size: 989 Bytes

Versions: 35

Compression:

Stored size: 989 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/face'

describe Puppet::Face[:config, '0.0.1'] do
  it "should use Settings#print_config_options when asked to print" do
    Puppet.settings.stubs(:puts)
    Puppet.settings.expects(:print_config_options)
    subject.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)
    subject.print("libdir", "ssldir")
    Puppet.settings[:configprint].should == "libdir,ssldir"
  end

  it "should always return nil" do
    Puppet.settings.stubs(:puts)
    Puppet.settings.expects(:print_config_options)
    subject.print("libdir").should be_nil
  end

  it "should default to all when no arguments are given" do
    Puppet.settings.stubs(:puts)
    Puppet.settings.expects(:print_config_options)
    subject.print
    Puppet.settings[:configprint].should == "all"
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
puppet-3.4.3 spec/unit/face/config_spec.rb
puppet-3.4.2 spec/unit/face/config_spec.rb
puppet-3.4.1 spec/unit/face/config_spec.rb
puppet-3.4.0 spec/unit/face/config_spec.rb
puppet-3.4.0.rc2 spec/unit/face/config_spec.rb
puppet-3.4.0.rc1 spec/unit/face/config_spec.rb
puppet-3.3.2 spec/unit/face/config_spec.rb
puppet-3.3.1 spec/unit/face/config_spec.rb
puppet-3.3.1.rc3 spec/unit/face/config_spec.rb
puppet-3.3.1.rc2 spec/unit/face/config_spec.rb
puppet-3.3.1.rc1 spec/unit/face/config_spec.rb
puppet-3.3.0 spec/unit/face/config_spec.rb
puppet-3.3.0.rc3 spec/unit/face/config_spec.rb
puppet-3.3.0.rc2 spec/unit/face/config_spec.rb
puppet-3.2.4 spec/unit/face/config_spec.rb
puppet-3.2.3 spec/unit/face/config_spec.rb
puppet-3.2.3.rc1 spec/unit/face/config_spec.rb
puppet-3.2.2 spec/unit/face/config_spec.rb
puppet-3.2.1 spec/unit/face/config_spec.rb
puppet-3.2.1.rc1 spec/unit/face/config_spec.rb