How to write tests for facebook graph api in my rails application?

I am using rails 3 and experimenting with a facebook api chart. I am trying to do something in TDD / BDD, but I'm not sure how to test my calls on api. Am I just wrapping facebook api methods in stubs and returning mock objects?

+3
source share
2 answers

I ran into a similar problem. I look at https://github.com/mislav/fakeweb as a way to mock http responses. They have not used it for real yet, but based on my preliminary experiments, I think this will work for my purposes. Perhaps this will work for you too.

+1
source

, . Facebook FQL Graph API, .

http://code.google.com/p/mockfacebook/

0

Source: https://habr.com/ru/post/1796579/


All Articles