stub_responses function in Dynamodb, how can I pass query when stub? #3036
Labels
documentation
This is a problem with documentation.
guidance
Question that needs advice or information.
Describe the issue
I'm having a problem when my code uses
get_item
multiple times. However, if I write the test this way, every call to get_item will return the same data:How can i differentiate each time
get_item
to assign data to them differently? example:first time:
stub_dynamodb_client.stub_responses(:get_item, item: {"post_id" => 1})
second time:
stub_dynamodb_client.stub_responses(:get_item, item: {"comment_id" => 2})
Pls, help me. Thankssss
Links
https://docs.aws.amazon.com/sdk-for-ruby/v2/api/Aws/ClientStubs.html#stub_responses-instance_method
The text was updated successfully, but these errors were encountered: