4 it { is_expected.not_to eq(nil) }
5 it { is_expected.to run.with_params('a', '').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
7 context 'when running at a specific time' do
9 # get a value before stubbing the function
10 test_time = Time.utc(2006, 10, 13, 8, 15, 11)
11 allow(Time).to receive(:new).with(no_args).and_return(test_time).once
13 it { is_expected.to run.with_params.and_return(1_160_727_311) }
14 it { is_expected.to run.with_params('').and_return(1_160_727_311) }
15 it { is_expected.to run.with_params([]).and_return(1_160_727_311) }
16 it { is_expected.to run.with_params({}).and_return(1_160_727_311) }
17 it { is_expected.to run.with_params('foo').and_return(1_160_727_311) }
18 it { is_expected.to run.with_params('UTC').and_return(1_160_727_311) }
19 it { is_expected.to run.with_params('America/New_York').and_return(1_160_727_311) }