4 it { is_expected.not_to eq(nil) }
5 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
6 it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
9 it { is_expected.to run.with_params('$::foo').and_return(nil) }
11 context 'given variables in namespaces' do
14 class site::data { $foo = 'baz' }
19 it { is_expected.to run.with_params('site::data::foo').and_return('baz') }
20 it { is_expected.to run.with_params('::site::data::foo').and_return('baz') }
21 it { is_expected.to run.with_params('::site::data::bar').and_return(nil) }
24 context 'given variables in namespaces' do
27 class site::info { $lock = 'ŧҺîš íš ắ śţřĭŋĝ' }
28 class site::new { $item = '万Ü€‰' }
34 it { is_expected.to run.with_params('site::info::lock').and_return('ŧҺîš íš ắ śţřĭŋĝ') }
35 it { is_expected.to run.with_params('::site::new::item').and_return('万Ü€‰') }