Skip to content

Instantly share code, notes, and snippets.

@dhchow
Created July 12, 2010 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhchow/473092 to your computer and use it in GitHub Desktop.
Save dhchow/473092 to your computer and use it in GitHub Desktop.
@facebook_me_response = {"id" => "222222"}
@facebook_page_response = {"id" => Factory.next(:medium_id).to_s, "name" => Factory.next(:medium_username), "fan_count" => 22.to_s}
@facebook_accounts_response = [{"id" => @facebook_page_response['id'], "access_token" => "tokenz"}]
Koala::Facebook::OAuth.any_instance.stubs('get_access_token_info').returns({'access_token' => 'token'})
Koala::Facebook::GraphAPI.any_instance.stubs('get_object').with('me').returns(@facebook_me_response)
Koala::Facebook::GraphAPI.any_instance.stubs('get_object').with(@facebook_page_response['id']).returns(@facebook_page_response)
Koala::Facebook::GraphAPI.any_instance.stubs('get_connections').with('me', 'accounts').returns(@facebook_accounts_response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment