Skip to content

Commit

Permalink
added client.set case using force option in order to clarify how to u…
Browse files Browse the repository at this point in the history
…se this option since they are 2 positional hash arguments
  • Loading branch information
joecabezas committed Oct 3, 2018
1 parent 5828241 commit 71781ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.bundle
Gemfile.lock
coverage/
.byebug_history
4 changes: 4 additions & 0 deletions spec/stasche/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
error_class = Stasche::Store::KeyAlreadyExistsError
expect { client.set(foo: 'bar') }.to raise_error(error_class)
end

it 'does not throws an exception if forced' do
expect { client.set({ foo: 'bar' }, force: true) }.to_not raise_error
end
end
end

Expand Down

0 comments on commit 71781ef

Please sign in to comment.