summaryrefslogtreecommitdiff
path: root/spec/functions/getvar_spec.rb
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-10-13 14:22:08 +0200
committerVarac <varac@leap.se>2017-10-13 14:22:08 +0200
commitf7779ce2eacaca51790d4e8d7756442b02612d30 (patch)
tree56871c123e1c964fc26e36bb86831a4a3511bd4f /spec/functions/getvar_spec.rb
parent066c08f8362d53f0f30897cb8710d11260c726ea (diff)
parent2339ea8db67ac7ef02d707c2a6011ae50f5d82b5 (diff)
Merge remote-tracking branch 'origin/master' into leap_masterHEADmaster
Diffstat (limited to 'spec/functions/getvar_spec.rb')
-rwxr-xr-xspec/functions/getvar_spec.rb15
1 files changed, 15 insertions, 0 deletions
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
+