-
-
Save maesitos/c0239c06cd3bf5cbf6bf7c9cf686e668 to your computer and use it in GitHub Desktop.
Capybara in Rails Console
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
# 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