Add initial spec test

This commit is contained in:
Branan Purvine-Riley 2012-06-18 16:12:32 -07:00
parent 62f265c0e5
commit c386cd4a71
6 changed files with 43 additions and 0 deletions

3
.fixtures.yml Normal file
View File

@ -0,0 +1,3 @@
fixtures:
symlinks:
"horizon": "#{source_dir}"

5
.gemfile Normal file
View File

@ -0,0 +1,5 @@
source :rubygems
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'

1
Rakefile Normal file
View File

@ -0,0 +1 @@
require 'puppetlabs_spec_helper/rake_tasks'

View File

@ -0,0 +1,33 @@
require 'spec_helper'
describe 'horizon' do
let :params do
{
'cache_server_ip' => '10.0.0.1'
}
end
describe 'when running on redhat' do
let :facts do
{
'osfamily' => 'RedHat'
}
end
it {
should contain_service('httpd').with_name('httpd')
}
end
describe 'when running on debian' do
let :facts do
{
'osfamily' => 'Debian'
}
end
it {
should contain_service('httpd').with_name('apache2')
}
end
end

0
spec/fixtures/manifests/site.pp vendored Normal file
View File

1
spec/spec_helper.rb Normal file
View File

@ -0,0 +1 @@
require 'puppetlabs_spec_helper/module_spec_helper'