From 023e234cbeaf665e25b210ee64d4ff9d5062f065 Mon Sep 17 00:00:00 2001 From: Tomas Barton Date: Mon, 9 Feb 2015 10:50:41 +0100 Subject: [PATCH] tests for #13 --- spec/classes/debian_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/classes/debian_spec.rb b/spec/classes/debian_spec.rb index 2163598..85a0742 100644 --- a/spec/classes/debian_spec.rb +++ b/spec/classes/debian_spec.rb @@ -136,4 +136,20 @@ }) } end + context 'fail when no packge provided' do + let(:facts) {{ + :operatingsystem => 'Ubuntu', + :osfamily => 'Debian', + :lsbdistcodename => 'trusty', + }} + + let(:params) { { + :install_java => true, + } } + + it { expect { + should compile + }.to raise_error(/Java installation is required/) } + end + end