New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: support Faraday::FlatParamsEncoder
in Faraday::Adapter::Test
#1312
Comments
Hi @yykamei, the above makes sense to me, I'd welcome a PR. |
Also, remember that |
Hi @iMacTia, thanks for your reply.
Oh, it seems not to pass in the latest
But, if I change the code like this, the test will pass. I rewrote the issue description. diff --git a/a.rb b/a.rb
index c4b7084..91d795d 100644
--- a/a.rb
+++ b/a.rb
@@ -27,7 +27,7 @@ RSpec.describe Client do
expect(client.sushi('ebi', params: { a: %w[x y z] })).to eq('shrimp')
# Test should not pass due to the lack of "y" and "z" for `a`
- expect(client.sushi('ebi', params: { a: %w[x] })).to eq('shrimp')
+ expect(client.sushi('ebi', params: { a: %w[z] })).to eq('shrimp')
stubs.verify_stubbed_calls
end
end Thanks anyway. I'm going to make some changes 💪 |
This issue was resolved with #1316. Thank you! |
#1291 introduced
strict_mode
inFaraday::Adapter::Test::Stubs
, and I want more features for the mode: supportingFaraday::FlatParamsEncoder
. For example, if I want to call an HTTP request with the same query parametera
multiple times, I expect the test stub to check whether the same parameters with different values are all correctly passed.What do you think? I want to open a pull request if it makes sense.
The text was updated successfully, but these errors were encountered: