Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

specs busted because IANA now redirects example.com #78

Closed
phiggins opened this Issue · 4 comments

4 participants

@phiggins

Doing a get on "www.example.com" used to return a simple page, now it redirects to "http://www.iana.org/domains/example/".

This is causing many, many failures when running the specs.

@grig

See #79 for a solution.

@phiggins

I looked over this, and I don't think this is the best way to fix the specs because you're changing what's being tested. IMO, it would be better to replace "www.example.com" with another static page (maybe even "http://www.iana.org/domains/example/") and change the associated content lengths, etc.

@grig

I agree in that this is not the best way; it just appeared to me to be the fastest way to bring specs back to a working state. Using iana.org/domains/example doesn't sound like a good idea to me because its contents are more likely to change than example.com's.

Perhaps there is a better way of testing webmock without relying on behavior of external HTTP servers at all?

@myronmarston
Collaborator

I merged in @grig's pull request, but ultimately, I agree it's not the best way. It was just the expedient way to get the specs passing again so I could make some other bug fixes.

If either of you want to take a shot at providing a better solution, please do. Here are a couple ideas of mine:

  • Create a simple gist here on github with some known content, and make requests against that.
  • Boot a simple little local sinatra app that returns known responses. This is what I use for VCR (see here and here for the code).
@jcf jcf closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.