Created
September 14, 2012 21:01
-
-
Save seth-macpherson/3724783 to your computer and use it in GitHub Desktop.
Load Rails Console in TEST mode then load the capybara_irb.rb 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
$ RAILS_ENV=test rails console | |
Loading test environment (Rails 3.2.8) | |
1.9.3p125 :001 > load 'test/capybara_irb.rb' | |
1.9.3p125 :002 > prep_test_data # this is typically run by my tests as setup :prep_test_data... | |
################################################################ | |
Factory Girl pumps out all my required models to get rolling... | |
################################################################ | |
1.9.3p125 :205 > visit '/admin' # this opens Firefox via the Selenium WebDriver | |
1.9.3p125 :206 > find('.x-some .y-selector').click # --> returns true if element is found, plus you can *see* happen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment