puppet-trove/spec/classes/trove_deps_spec.rb
Alex Schultz e8be948eb7 Update tests to use rspec-puppet-facts
This change updates the tests to properly use rspec-puppet-facts and
on_supported_os.

Change-Id: Ia96c837440b1df3785d9abfd3a3ac8bfdf21c9ab
2016-10-26 08:19:13 -06:00

35 lines
1.0 KiB
Ruby

require 'spec_helper'
describe 'trove::deps' do
shared_examples_for 'trove::deps' do
context 'defaults' do
it 'set up the anchors' do
is_expected.to contain_anchor('trove::install::begin')
is_expected.to contain_anchor('trove::install::end')
is_expected.to contain_anchor('trove::config::begin')
is_expected.to contain_anchor('trove::config::end')
is_expected.to contain_anchor('trove::db::begin')
is_expected.to contain_anchor('trove::db::end')
is_expected.to contain_anchor('trove::dbsync::begin')
is_expected.to contain_anchor('trove::dbsync::end')
is_expected.to contain_anchor('trove::service::begin')
is_expected.to contain_anchor('trove::service::end')
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it_configures 'trove::deps'
end
end
end