Created
September 20, 2011 14:57
-
-
Save danmcclain/1229321 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
scenario 'Logging in' do | |
ENV["BOSTONRB_ADMIN_NAME"] = name | |
ENV["BOSTONRB_ADMIN_PASSWORD"] = password | |
if page.driver.respond_to?(:basic_auth) | |
page.driver.basic_auth(name, password) | |
elsif page.driver.respond_to?(:basic_authorize) | |
page.driver.basic_authorize(name, password) | |
elsif page.driver.respond_to?(:browser) && page.driver.browser.respond_to?(:basic_authorize) | |
page.driver.browser.basic_authorize(name, password) | |
else | |
raise "I don't know how to log in!" | |
end | |
visit admin_presentations_path | |
page.driver.response.status.should == 200 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment