Skip to content

Commit 500f992

Browse files
committed
added client.set case using force option in order to clarify how to use this option since they are 2 positional hash arguments
1 parent 5828241 commit 500f992

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.bundle
33
Gemfile.lock
44
coverage/
5+
.byebug_history

spec/stasche/client_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
error_class = Stasche::Store::KeyAlreadyExistsError
7575
expect { client.set(foo: 'bar') }.to raise_error(error_class)
7676
end
77+
78+
it 'does not throws an exception if forced' do
79+
error_class = Stasche::Store::KeyAlreadyExistsError
80+
expect { client.set({foo: 'bar'}, {force: true}) }.to_not raise_error
81+
end
7782
end
7883
end
7984

0 commit comments

Comments
 (0)