Skip to content

evilmartians/capybara-thruster

Repository files navigation

Gem Version Build

Capybara Thruster server

This gem makes it possible to use Thruster as a Capybara server. Run your browser test with HTTP/2 enabled and static assets served via Thruster for faster load times!

Tip

Using AnyCable? This gem works with AnyCable-d Thruster, so you can run your system tests against a real AnyCable server with all its features!

Getting started

Prerequisites

Before adding the gem to your project, ensure you have either thruster or anycable-thruster installed. You can add one of these gems to your Gemfile:

# For thruster
gem "thruster"

# or for anycable-thruster
gem "anycable-thruster"

Adding the gem to your project:

# Gemfile
gem "capybara-thruster", group: :test

Then, configure Capybara to use Thruster as a server:

Capybara.server = :thruster

# You can also specify some options.

# For example, if you want to see the server output,
# pass the `debug: true` option:
Capybara.server = :thruster, {debug: true}

# To customize the server settings, you can pass arbitrary environment
# variables via the `env` option:
Capybara.server = :thruster, {env: {"DEBUG" => "true"}}

# To specify Puma server options, use the `puma_options` option:
Capybara.server = :thruster, {puma_options: {Silent: false}}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/evilmartians/capybara-thruster.

Credits

This gem is generated via newgem template by @palkan.

License

The gem is available as open source under the terms of the MIT License.