Testing with Capybara [beta]

The phlex-testing-capybara gem provides a test helper that lets you use Capybara matchers.


Add the following to the test group in your Gemfile and run bundle install.

gem "phlex-testing-capybara"


You’ll need to require phlex/testing/capybara and include Phlex::Testing::Capybara::ViewHelper.

The render method will return a Capybara::Node::Simple and set the page attribute to the result.

📝 Edit this page on GitHub