We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think this may be a bug. Here's a failing test to demonstrate the behavior: master...maxjacobson:stubbed-request-is-nil
The text was updated successfully, but these errors were encountered:
This is because you did not specify a body to be returned, If you did your test would pass.
Like this:
describe 'HTTParty' do it "doesn't return nil" do req = stub_request(:post, 'http://example.com').to_return(status: 201, body: "response body") resp = HTTParty.post('http://example.com') expect(resp.success?).to be true expect(resp).to_not be_nil end end
Does that help?
Sorry, something went wrong.
@presidentJFK
aha! that does help, thanks
It's still a little unexpected but... I can work with that 😄
No prob. I'll look into updating the readme to make this more clear.
No branches or pull requests
I think this may be a bug. Here's a failing test to demonstrate the behavior: master...maxjacobson:stubbed-request-is-nil
The text was updated successfully, but these errors were encountered: