Add support for subdomains in test_helper requests #232

Merged
merged 2 commits into from Mar 27, 2013

2 participants

@kybishop

The current test_helper only allows requests straight to localhost. This change adds support for subdomains in the request_data hash of the various request methods

with_api(MyAwesomeAPI) do
  get_request(:subdomain => 'notifications.') do . . .
@kybishop

Alternatively, I'd be happy to write up a commit that allows you to change the domain entirely (instead of just prepending a subdomain)

@dj2
postrank-labs member

This looks pretty good. Although, to your comment I think having the ability to change the localhost:post to something user defined maybe the better solution. Can you change the patch over to pass :domain and replacing the localhost:port with the provided domain if it's present?

@kybishop

Let me know how that looks, happy to make changes.

@dj2 dj2 merged commit 29742a3 into postrank-labs:master Mar 27, 2013

1 check failed

Details default The Travis build failed
@dj2
postrank-labs member

Merged. Thanks a lot for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment