Using Koala with mockfacebook

Swapnil Abnave edited this page Nov 20, 2013 · 5 revisions

Ryan Barrett's mockfacebook is a standalone HTTP server that implements Facebook's FQL and Graph API, providing an easy and useful way to run your unit and integration tests against a realistic Facebook interface.

Using Koala with mockfacebook is easy -- just add the following snippet to your spec_helper:

module Koala
  module HTTPService
    def self.server(options = {})

You can wrap that block in appropriate conditionals if you want to be able to toggle between live and mocked responses, like so:

if ENV["MOCK"] # or your preferred trigger
  # module Koala...

Important note: mockfacebook does not yet support the complete Facebook API; check out the documentation for a list of available features.

If there's enough interest, we can build support for mockfacebook directly into Koala.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.