Created
July 10, 2012 22:49
-
-
Save 13k/3086739 to your computer and use it in GitHub Desktop.
Capybara in Rails Console
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 console test | |
# # or | |
# RAILS_ENV=test rails console | |
require 'capybara/dsl' | |
Capybara.app = app.instance_variable_get("@app") | |
cap = Object.new.instance_eval { extend Capybara::DSL; self } | |
# cap.visit '/' | |
# cap.page.find 'h1' | |
# etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment