debian/bullseye
debian/jessie
|
Last change
on this file since ef56459 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:
1.3 KB
|
| Line | |
|---|
| 1 | require 'spec_helper'
|
|---|
| 2 |
|
|---|
| 3 | describe 'unique' do
|
|---|
| 4 | describe 'signature validation' do
|
|---|
| 5 | it { is_expected.not_to eq(nil) }
|
|---|
| 6 | it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
|
|---|
| 7 | it {
|
|---|
| 8 | pending("Current implementation ignores parameters after the first.")
|
|---|
| 9 | is_expected.to run.with_params([], 'extra').and_raise_error(Puppet::ParseError, /wrong number of arguments/i)
|
|---|
| 10 | }
|
|---|
| 11 | it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) }
|
|---|
| 12 | it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) }
|
|---|
| 13 | it { is_expected.to run.with_params(true).and_raise_error(Puppet::ParseError, /Requires either array or string to work/) }
|
|---|
| 14 | end
|
|---|
| 15 |
|
|---|
| 16 | context 'when called with an array' do
|
|---|
| 17 | it { is_expected.to run.with_params([]).and_return([]) }
|
|---|
| 18 | it { is_expected.to run.with_params(['a']).and_return(['a']) }
|
|---|
| 19 | it { is_expected.to run.with_params(['a', 'b', 'a']).and_return(['a', 'b']) }
|
|---|
| 20 | end
|
|---|
| 21 |
|
|---|
| 22 | context 'when called with a string' do
|
|---|
| 23 | it { is_expected.to run.with_params('').and_return('') }
|
|---|
| 24 | it { is_expected.to run.with_params('a').and_return('a') }
|
|---|
| 25 | it { is_expected.to run.with_params('aaba').and_return('ab') }
|
|---|
| 26 | end
|
|---|
| 27 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.