Created
April 29, 2009 22:38
-
-
Save ohammersmith/104117 to your computer and use it in GitHub Desktop.
Snippets needed to make webrat work in rails integration tests.
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
| ./script/generate integration selenium_attach_file |
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
| require 'test_helper' | |
| class SeleniumAttachFileTest < ActionController::IntegrationTest | |
| fixtures :all | |
| test "attach a file with webrat" do | |
| visit "/" | |
| # sleep 60 | |
| selenium.attach_file("id=some_file", "file:///Users/otto/repos/protopipe/Rakefile") | |
| sleep 120 | |
| end | |
| end |
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
| require 'webrat' | |
| Webrat.configure do |config| | |
| # config.mode = :rails | |
| config.mode = :selenium | |
| config.selenium_browser_key = "*firefox3" | |
| # config.selenium_browser_key = "*safari" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment