From b13af823335e6952c8494ecbdb6b2955fbd2d9eb Mon Sep 17 00:00:00 2001 From: Paula McMaw Date: Tue, 28 Feb 2017 12:03:01 +0000 Subject: (FM-6058) - Unit tests for med effort functions --- spec/functions/getvar_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec/functions/getvar_spec.rb') diff --git a/spec/functions/getvar_spec.rb b/spec/functions/getvar_spec.rb index 54f1842..55789d8 100755 --- a/spec/functions/getvar_spec.rb +++ b/spec/functions/getvar_spec.rb @@ -20,4 +20,19 @@ describe 'getvar' do it { is_expected.to run.with_params('::site::data::foo').and_return('baz') } it { is_expected.to run.with_params('::site::data::bar').and_return(nil) } end + + context 'given variables in namespaces' do + let(:pre_condition) { + <<-'ENDofPUPPETcode' + class site::info { $lock = 'ŧҺîš íš ắ śţřĭŋĝ' } + class site::new { $item = '万Ü€‰' } + include site::info + include site::new + ENDofPUPPETcode + } + + it { is_expected.to run.with_params('site::info::lock').and_return('ŧҺîš íš ắ śţřĭŋĝ') } + it { is_expected.to run.with_params('::site::new::item').and_return('万Ü€‰') } + end end + -- cgit v1.2.3