Skip to content
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

Poundpay should not make an external http request in the test environment #2

Open
ajsharp opened this issue Apr 27, 2011 · 2 comments

Comments

@ajsharp
Copy link

ajsharp commented Apr 27, 2011

We use webmock to stub out http requests made in our test suite, and the poundpay gem makes an external http request when the library is loaded, which makes it very difficult to stub out. I'll post any elegant solutions I have to this problem back here.

@ajsharp
Copy link
Author

ajsharp commented Apr 27, 2011

One workaround is to not define a callback url in the test configuration for poundpay.

@matin
Copy link
Member

matin commented Apr 27, 2011

Aarg .. I introduced this issue in the latest release. What is the idiomatic Ruby way to fix this?

Would it make sense for you to mock Poundpay.configure altogether? It seems strange to me that I would check for your environment in Poundpay.configure, especially since I'd have to make certain assumptions about where your environment is defined.

If not including the callback_url in the test configs works for you let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants