Created
July 19, 2010 13:39
-
-
Save jstirk/481414 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Given /^I am logged in as a Facebook user$/ do | |
| # Initialize facebooker session | |
| # This will set all the parameters that FB normally passes through, as well as set up | |
| # a default Facebooker::Mock::Session. It all just magically happens from this one liner. | |
| @integration_session = open_session | |
| # Now, we need to specify the default options for the request - in this case, we're setting | |
| # that the FB UID is 1, and they have the friends defined in FACEBOOK_FRIENDS - simply UIDs separated by commas. | |
| @integration_session.default_request_params.merge!( :fb_sig_user => 1, :fb_sig_friends => '2,3' ) | |
| # If you need to make FB requests in your steps, you can use @integration_session to make them - they | |
| # will then go through the fixtures defined elsewhere. | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment