parasquid / namecheap

ruby namecheap API wrapper
GNU Lesser General Public License v3.0
31 stars 20 forks source link

Use VCR / WebMock for testing Namecheap replies #4

Open parasquid opened 11 years ago

parasquid commented 11 years ago

https://github.com/vcr/vcr will record api replies from Namecheap so we have a static, predictable, unchanging reply from which we can base our tests on.

https://github.com/bblimke/webmock intercepts web calls and mocks them out so tests are fast and we don't have to be online.

Together they make for a more robust test suite.

dmyers commented 11 years ago

Yeah VCR and WebMock look great.

parasquid commented 10 years ago

I've been working with VCR and WebMock on company projects, and while they're great for integration tests, they can make the test suite more fragile and very hard to maintain.

We should still use the two gems, but I think I'll do some more refactoring of the code and do proper tests to exercise objects better without the use of VCR.