PeterBorah / vigor

An unofficial ruby wrapper for the League of Legends API
MIT License
4 stars 4 forks source link

Refactor tests to not hit the API so often #4

Closed PeterBorah closed 10 years ago

PeterBorah commented 10 years ago

We should have at least few tests that actually check the connection to Riot's servers, but we shouldn't hit the servers for every test. The current pattern is unsustainable, because of rate limiting, and also just the slowness of making API calls with every test. Also, I don't want to break the test by changing my masteries. :P

We should investigate gems like webmock and vcr, and find a sustainable pattern that still gives us realistic tests.

imogenkinsman commented 10 years ago

Looking into this - the tests are going to start exhausting our API calls as they grow, so mocking is probably going to be necessary.