Capybara is intended to be used for automating a browser to test your application's features. This is different than the integration tests that Rails provides, so you must use the Capybara::Rails::TestCase for your feature tests.
While not recommended, you can add Capybara to your integration tests. To do this add the following to your test_helper.rb file:
class ActionDispatch::IntegrationTestinclude Capybara::DSLinclude Capybara::Assertionsend