Dommy
A pure-Ruby, browser-like DOM stack for testing Rack/Rails apps without a real browser. This repository is a monorepo containing the core library and its integration gems.
Gems
| Gem | Path | Description |
|---|---|---|
dommy |
gems/dommy |
happy-dom-style DOM polyfill in pure Ruby (Nokogiri/Nokolexbor backend). |
dommy-rack |
gems/dommy-rack |
Rack-backed, browser-like session layer over a Dommy::Document. |
capybara-dommy |
gems/capybara-dommy |
A Capybara driver backed by dommy and dommy-rack. |
Each gem keeps its own gemspec, README, and test suite, and is released to RubyGems independently.
Note
dommy-js-quickjs (a QuickJS
JavaScript backend) lives in its own repository because it depends on the
native quickjs gem with a separate build/release cadence.
Development
A single root Gemfile resolves all gems from their local paths, so no path: overrides are needed:
bundle installRunning tests
# Every gem
bundle exec rake test
# A single gem
bundle exec rake test:dommy
bundle exec rake test:dommy-rack
bundle exec rake test:capybara-dommyYou can also run a gem's suite from its own directory:
cd gems/dommy && bundle exec rakedommy and dommy-rack use Minitest; capybara-dommy uses RSpec (including the Capybara driver compliance suite).
Releasing
Build and push each gem from its own subdirectory:
cd gems/dommy && bundle exec rake releaseLicense
MIT — see LICENSE.txt.