summaryrefslogtreecommitdiff
path: root/spec/functions/delete_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functions/delete_spec.rb')
-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