Created
October 24, 2009 03:34
-
-
Save jasonm/217342 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
# pasted for a comment on http://bkocik.net/2009/05/07/testing-twitter-oauth-with-cucumber-webrat-and-fakeweb/ | |
Given /^I am signed in as "@(.*)"$/ do |twitter_username| | |
@twitter_username = twitter_username # used inside #fixture_file by #stub_:method - see http://gist.github.com/125281 | |
stub_post('https://twitter.com/oauth/request_token', 'access_token') | |
stub_post('https://twitter.com/oauth/access_token', 'access_token') | |
stub_get('https://twitter.com/account/verify_credentials.json', 'verify_credentials.json') | |
visit path_to('the login page') | |
visit path_to('the oauth callback page') | |
end | |
# from features/support/paths.rb | |
when /the oauth callback page/ | |
oauth_callback_path | |
when /the login page/ | |
login_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment