From 4510682dff23142df5de4cfcc988e4319fcb73cd Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 31 Oct 2016 23:15:18 +0100 Subject: add a default set of specs so that the minimum is tested --- spec/classes/init_spec.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 spec/classes/init_spec.rb (limited to 'spec/classes/init_spec.rb') diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb new file mode 100644 index 0000000..be4f30b --- /dev/null +++ b/spec/classes/init_spec.rb @@ -0,0 +1,27 @@ +require File.expand_path(File.join(File.dirname(__FILE__),'../spec_helper')) + +describe 'tor', :type => 'class' do + let(:default_facts) { + { + :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + } + } + let(:facts){ default_facts } + let(:pre_condition){'Exec{path => "/bin"}' } + describe 'with standard' do + it { is_expected.to compile.with_all_deps } + + it { is_expected.to contain_class('tor::base') } + context 'on Debian' do + let(:facts) { + { + :osfamily => 'Debian', + :operatingsystem => 'Debian', + } + } + it { is_expected.to compile.with_all_deps } + it { is_expected.to contain_class('tor::base') } + end + end +end -- cgit v1.2.3