Configure Test::Unit and Capybara
While trying to set up Capybara with Test::Unit, I ran into trouble finding documentation on how to do it. Ultimately, I found the answer in the gem’s README, but for those who just want to google-and-go, I figured I’d post this for you.
Simply, throw this in your Gemfile
1 2 3 | group :test do gem 'capybara' end |
and run `bundle`
Now, open up test/test_helper.rb: we’re going to require capybara, and then crack open the integration test class to include Capybara and pass it your app
1 2 3 4 5 6 7 8 | # test_helper.rb ... include Capybara class ActionDispatch::IntegrationTest include Capybara Capybara.app = Issuepad::Application end |
That should do it, let me know if you run into any other issues.