Created
July 12, 2009 20:31
-
-
Save jamesgolick/145788 to your computer and use it in GitHub Desktop.
This file contains 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
def new_session(as_user_with_nickname) | |
open_session do |s| | |
s.extend(Webrat::Matchers) | |
s.extend(Webrat::Methods) | |
unless as_user_with_nickname.nil? | |
s.visit login_url | |
s.fill_in "Nickname or Email", :with => as_user_with_nickname | |
s.fill_in "Password", :with => "swordfish" | |
s.click_button "Login to Fetlife" | |
end | |
yield(s) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment