Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write tests for facebook graph api in my rails app?

I'm using rails 3 and experimenting with the facebook graph api. I'm trying to do things in a TDD/BDD way but I'm not sure how to test my calls to the api. Do I simply wrap the facebook api methods into stubs and return mock objects?

like image 340
Fendo Avatar asked Dec 14 '25 14:12

Fendo


1 Answers

I'm actually faced with a similar problem. I'm looking at https://github.com/mislav/fakeweb as a way of mocking out http responses. Haven't used it for real yet, but based on my preliminary experiments I think it'll work for my purposes. Maybe it'll work for yours too.

like image 170
Josh Deeden Avatar answered Dec 16 '25 16:12

Josh Deeden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!