0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since 5519ced was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
- gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
|
-
Property mode
set to
100755
|
|
File size:
937 bytes
|
| Line | |
|---|
| 1 | require 'spec_helper'
|
|---|
| 2 |
|
|---|
| 3 | describe 'time' do
|
|---|
| 4 | it { is_expected.not_to eq(nil) }
|
|---|
| 5 | it { is_expected.to run.with_params('a', '').and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
|
|---|
| 6 |
|
|---|
| 7 | context 'when running at a specific time' do
|
|---|
| 8 | before(:each) {
|
|---|
| 9 | # get a value before stubbing the function
|
|---|
| 10 | test_time = Time.utc(2006, 10, 13, 8, 15, 11)
|
|---|
| 11 | Time.expects(:new).with().returns(test_time).once
|
|---|
| 12 | }
|
|---|
| 13 | it { is_expected.to run.with_params().and_return(1160727311) }
|
|---|
| 14 | it { is_expected.to run.with_params('').and_return(1160727311) }
|
|---|
| 15 | it { is_expected.to run.with_params([]).and_return(1160727311) }
|
|---|
| 16 | it { is_expected.to run.with_params({}).and_return(1160727311) }
|
|---|
| 17 | it { is_expected.to run.with_params('foo').and_return(1160727311) }
|
|---|
| 18 | it { is_expected.to run.with_params('UTC').and_return(1160727311) }
|
|---|
| 19 | it { is_expected.to run.with_params('America/New_York').and_return(1160727311) }
|
|---|
| 20 | end
|
|---|
| 21 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.