Last active
December 2, 2015 14:57
-
-
Save kjetilho/3ff3eccdec86a1e43447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'bareos::client::fileset' do | |
context "basic fileset" do | |
let(:title) { 'basic' } | |
let(:params) { { :include_paths => ['/custom'] } } | |
let(:facts) { RSpec.configuration.default_facts } | |
let(:pre_condition) { <<-eot | |
class bareos::client { | |
$client_name = $::fqdn | |
} | |
include bareos::client | |
eot | |
} | |
it { should compile.with_all_deps } | |
it do | |
expect(exported_resources).to contain_bareos__fileset_definition("#{facts[:fqdn]}-basic") | |
.with_include_paths(['/custom']) | |
.with_acl_support(true) | |
.with_ignore_changes(true) | |
.with_exclude_dir_containing('.nobackup') | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this works. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'puppetlabs_spec_helper/module_spec_helper' | |
# Get facts from a gem | |
require 'rspec-puppet-facts' | |
include RspecPuppetFacts | |
# Default environment for tests | |
RSpec.configure do |c| | |
c.include Support::ExportedResources # see above | |
c.hiera_config = 'spec/fixtures/hiera/hiera.yaml' | |
c.default_facts = { :fqdn => 'node.example.com' } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment