summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBryan Jen <bryan.jen@gmail.com>2016-05-03 15:09:33 -0700
committerBryan Jen <bryan.jen@gmail.com>2016-05-03 15:09:33 -0700
commitf48747b8af8fdad455cfd5b5d0d2c2abfd8c9415 (patch)
tree4edf52d916fc14ea8a3bb023b505c6cfa2e27441 /spec
parent9e1f74f3fcac4aeaccade3ea92e6cafbaf71a64f (diff)
parent2a75ed08a1b967d5d64144c449a1c1aed50e8d78 (diff)
Merge pull request #603 from puppetlabs/4.12.x
Mergeback 4.12.x
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functions/delete_spec.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/functions/delete_spec.rb b/spec/functions/delete_spec.rb
index 998f9a6..cf696ac 100755
--- a/spec/functions/delete_spec.rb
+++ b/spec/functions/delete_spec.rb
@@ -12,8 +12,8 @@ describe 'delete' do
it { is_expected.to run.with_params([], 'two').and_return([]) }
it { is_expected.to run.with_params(['two'], 'two').and_return([]) }
it { is_expected.to run.with_params(['two', 'two'], 'two').and_return([]) }
- it { is_expected.to run.with_params(['one', 'two', 'three'], '^t.*').and_return(['one']) }
it { is_expected.to run.with_params(['one', 'two', 'three'], 'four').and_return(['one', 'two', 'three']) }
+ it { is_expected.to run.with_params(['one', 'two', 'three'], 'e').and_return(['one', 'two', 'three']) }
it { is_expected.to run.with_params(['one', 'two', 'three'], 'two').and_return(['one', 'three']) }
it { is_expected.to run.with_params(['two', 'one', 'two', 'three', 'two'], 'two').and_return(['one', 'three']) }
it { is_expected.to run.with_params(['one', 'two', 'three', 'two'], ['one', 'two']).and_return(['three']) }
@@ -33,7 +33,7 @@ describe 'delete' do
it { is_expected.to run.with_params('barfoobar', ['foo', 'barbar']).and_return('') }
end
- describe 'deleting from a hash' do
+ describe 'deleting from an array' do
it { is_expected.to run.with_params({}, '').and_return({}) }
it { is_expected.to run.with_params({}, 'key').and_return({}) }
it { is_expected.to run.with_params({'key' => 'value'}, 'key').and_return({}) }
@@ -45,10 +45,6 @@ describe 'delete' do
.with_params({'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'}, ['key1', 'key2']) \
.and_return( {'key3' => 'value3'})
}
- it { is_expected.to run \
- .with_params({'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'}, ['^key\d']) \
- .and_return({})
- }
end
it "should leave the original array intact" do