我想使用相同的uri和不同的请求参数,我该怎么做? 以下示例似乎不起作用(
stub_request(:post, "http://tests/1/users/create").
with({email: 'wrong_format'}).
to_return(status: 400, body: {msg: 'Bad request'}.to_json, headers: {})
stub_request(:post, "http://tests/1/users/create").
with(email: "test@mail.com").
to_return(status: 200, body: {msg: 'Thanks for signing up for us'}.to_json, headers: {})