kreeger / IFBKThirtySeven

A collection of API adapters for 37signal's various services. Currently only contains adapters for Campfire and Launchpad.
MIT License
5 stars 0 forks source link

Add basic testing #4

Open fabiopelosin opened 10 years ago

fabiopelosin commented 10 years ago

I would recommend to use Nocilla and Kiwi.

This (slide deck)[https://speakerdeck.com/lascorbe/luis-solanos-slides-at-nsspain-2013] could be a nicer reference.

kreeger commented 10 years ago

Perfect! I've used both Kiwi and Specta, but I've not tried Nocilla. We should definitely do this. I'll see if I can add some of these ASAP. I've written full tests on other closed-source projects before, I swear!

hangs head in shame

fabiopelosin commented 10 years ago

Nothing to be shamed about! IFBKThirtySeven has been pretty solid for me, and this is all that matters. I have been using with my OS X client for a while, the UI sucks but it is functional, I'm polishing it to open source it.

I have added an initial test here: https://github.com/kreeger/IFBKThirtySeven/blob/master/ProjectTests/IFBKCampfireClientTests.m

kreeger commented 10 years ago

That's awesome. Thanks! I'll add some more tests as I go along.

kreeger commented 10 years ago

I'm gonna look into Nocilla today. I've been using VCRURLConnection on projects for work (in private BitBucket repos that I wish I could share, because I'm proud of them), and if Nocilla's any more elegant, I may be tempted to even switch all of my existing tests over to use it.

fabiopelosin commented 10 years ago

I've never used VCRURLConnection (although I have used the Ruby counterpart). I would prefer to use because it records the actual response from the server and thus it would be more robust. However as all the request require authentication I went with Nocilla to avoid storing any sensitive information. We could use VCRURLConnection and edit manually the generated JSON files but that approach might revel repetitive and will not allow to easily regenerate the cassettes without sharing the credentials (we might create a test account for that purpose though).

fabiopelosin commented 10 years ago

I have added the Travis configuration file in b5cd3951d049adba22112cdfb78d5222ed8f32e5. However I can't enable it. Can you do it?

kreeger commented 10 years ago

Absolutely — done! You'll have to make another push to trigger the first build.

fabiopelosin commented 10 years ago

Ace!