mtheoryx/goiu_shorten — Issue #14: refactor spec for local unauthenticated testing of gem
Author: mtheoryx
Created: 2012-03-06 15:10:02+00:00
State: open
Labels: enhancement

I also suggest you check into the VCR gem for your testing. It's pretty great in that it records responses from remote APIs and then plays them back for your tests. You don't actually need to talk "live" to the API for testing since you're just testing that your code works for known API responses. Not only does it make testing go so much faster, but in your case it would be even more helpful because it would allow anyone (even without valid creds) to run all the tests.
Just make sure that -- since you're actually dealing with an account/password -- you follow their instructions for redacting sensitive data from the cassettes.
I've got VCR hooked into my periodic_table gem on github if you want an example.