add tests for concat_basedir fact
This commit is contained in:
parent
0580e3f2a0
commit
a08709caf7
1 changed files with 18 additions and 0 deletions
18
spec/unit/facts/concat_basedir_spec.rb
Normal file
18
spec/unit/facts/concat_basedir_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'concat_basedir', :type => :fact do
|
||||
before(:each) { Facter.clear }
|
||||
|
||||
context 'Puppet[:vardir] ==' do
|
||||
it '/var/lib/puppet' do
|
||||
Puppet.stubs(:[]).with(:vardir).returns('/var/lib/puppet')
|
||||
Facter.fact(:concat_basedir).value.should == '/var/lib/puppet/concat'
|
||||
end
|
||||
|
||||
it '/home/apenny/.puppet/var' do
|
||||
Puppet.stubs(:[]).with(:vardir).returns('/home/apenny/.puppet/var')
|
||||
Facter.fact(:concat_basedir).value.should == '/home/apenny/.puppet/var/concat'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue