cucumber/cucumber-rails
66.0
Adequate · 6 November 2026
693
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
New step definitions for testing cucumber-rails installation scenarios
Added a new step definition file (\features/step\_definitions/cucumber\_rails\_steps.rb\) that provides reusable Gherkin steps for setting up test Rails applications. These steps allow scenarios to easily create new Rails apps with specific configurations, such as installing cucumber-rails inside or outside the test group, excluding database\_cleaner, skipping ActiveRecord, or forcing Selenium to run in headless Firefox mode. This centralizes the setup logic for integration tests, making feature files cleaner and more consistent when testing the gem's installation and configuration behavior.
_features/step\definitions · high confidence
Removals
Removal of legacy Cucumber and Feature generators
The \rails\_generators\ directory has removed the legacy Cucumber and Feature generators, including the \CucumberGenerator\, \FeatureGenerator\, and all associated templates (such as \webrat\_steps.rb\, \env.rb\, and \cucumber.rake\). This eliminates the ability to scaffold Cucumber integration and feature skeletons via the \script/generate\ command, effectively removing support for these legacy BDD tooling patterns from the generator suite.
_rails\generators · high confidence
Removed empty CucumberRails module stub
The empty CucumberRails module stub in lib/cucumber-rails.rb has been removed. This file contained no functional code, so users will no longer load this specific entry point, though the actual implementation remains under rails\_generators.
lib · high confidence
Behavioural changes
6 commits (0 fixes) modifying lib/generators/cucumber/templates
A change to existing behaviour in lib/generators/cucumber/templates — 6 commits, 5 files: “Remove mentions of disused spork gem”; “Add support for Cucumber version 12 (\#621)”; “V3/additional cleanups (\#572)”; and 3 more (refs \#621, \#572).
lib/generators/cucumber/templates · medium confidence · unverified
Add Rails 6+ Cucumber install generator
The \cucumber:install\ generator has been updated to support Rails 6 and later. It now configures Rails annotations to inspect Cucumber feature files in development and test environments, a change necessary because the previous annotation setup method (used in Rails 5 and earlier) is no longer available in Rails 6+. The generator also updates the default rake task name from \features\ to \cucumber\ and adjusts the database configuration logic to properly set up a \cucumber\ environment in \database.yml\.
lib/generators/cucumber · high confidence
Deferred loading of Cucumber-rails components when required outside env.rb
Cucumber-rails now detects if it is required outside of the Cucumber env.rb file and, instead of failing or loading immediately, it prints a warning and defers the loading of Rails and Cucumber components until env.rb is actually executed. This change ensures that the library loads correctly even if the gem is required prematurely, while guiding users to configure their Gemfile with \require: false\ to avoid the warning.
lib/cucumber · high confidence
Expanded Rails compatibility via new Appraisal gemfiles
The library now supports testing and compatibility with Rails versions 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1. This is achieved by adding new Appraisal gemfiles (rails\_6\_1.gemfile through rails\_8\_1.gemfile) that pin specific versions of railties, sqlite3, and other dependencies like capybara, factory\_bot, and cucumber to ensure stable test execution across these Rails releases.
gemfiles · high confidence
Rails 7.1 compatibility and decoupling from RSpec
The library now supports Rails 7.1 by adapting the ActionDispatch exception handling middleware to use the new symbol-based configuration instead of the deprecated boolean flag. It also removes the hard dependency on RSpec, allowing the framework to function in non-RSpec environments (such as Test::Unit or Minitest) by conditionally loading RSpec matchers only when available, and ensuring the World class inherits correctly from ActionDispatch::IntegrationTest without requiring RSpec-specific constants.
lib/cucumber/rails · high confidence
Refactor database strategies into dedicated classes
The database handling logic in \lib/cucumber/rails/database\ has been restructured so that each strategy (Deletion, Null, SharedConnection, Truncation) is now implemented in its own dedicated class file. This change improves code organization and maintainability by isolating the specific behaviors for different database cleaning modes, such as how connections are shared during JavaScript tests or how data is cleaned before and after scenarios.
lib/cucumber/rails/database · high confidence
Refactored Cucumber support infrastructure for Rails 8 compatibility
The test support layer has been restructured to improve reliability and extend compatibility to Rails 8. A new \CucumberRailsGemHelper\ module now manages dynamic gem installation, specifically adding SQLite 2.0 and Selenium 4.22 support for Rails 7.1+ and later versions. The \CucumberRailsSetupHelper\ streamlines test application generation by skipping unnecessary Rails components (such as Action Cable, Mailer, and JavaScript) to speed up setup. Additionally, \env.rb\ now configures Aruba with a 360-second exit timeout, and \hooks.rb\ ensures detailed stdout and stderr logging for failed scenarios to aid debugging.
features/support · high confidence
Reorganized database and mailer cleanup hooks with conditional execution
The database and mailer cleanup logic has been restructured into separate hook files (active\_record.rb, database\_cleaner.rb, mail.rb) to improve modularity. Database cleaning is now controlled by a new \autorun\_database\_cleaner\ flag, allowing users to disable automatic database cleaning via the \@no-database-cleaner\ tag or by setting the flag. The hooks now conditionally execute based on the presence of ActiveRecord and ActionMailer, and the database cleaner strategy is no longer overridden by the gem, deferring to the user's configuration. Additionally, a new \@allow-rescue\ hook has been added to temporarily enable \ActionController::Base.allow\_rescue\ for specific scenarios.
lib/cucumber/rails/hooks · high confidence
Support for Rails 7 HTML5 date inputs and CSRF-aware JS emulation
This update adds support for Rails 7 by detecting HTML5 date, time, and datetime input fields (type="date", "time", "datetime-local") in the \select\_dates\_and\_times\ helpers, falling back to legacy select-box logic only when these inputs are absent. It also introduces a new \javascript\_emulation\ module that enables the RackTest driver to simulate non-GET HTTP methods (DELETE, PUT, POST) via hidden form submissions, including automatic handling of Rails CSRF tokens to prevent session invalidation.
lib/cucumber/rails/capybara · high confidence
Test coverage
Added tests for Cucumber Rails database strategy handling; Added tests for the Cucumber install generator; Initial RSpec test configuration for Rails integration; New feature specifications for Cucumber-Rails configuration and database strategies.
Dependencies
Update gemspec dependencies and metadata for modern Ruby/Rails support
The cucumber-rails gemspec has been updated to require Ruby 3.2.0+ and Rails 6.1–8.x (via railties), with runtime dependencies pinned to Capybara 3.25–3.x and Cucumber 7–11.x. Development dependencies were refreshed to include Ammeter 1.1.7+, Appraisal 2.4.1–2.x, Aruba 2.2.x, DatabaseCleaner 2.1.x, RSpec 3.13.x, and RuboCop suite versions (rubocop 1.84.x, rubocop-rspec 3.9.x, rubocop-rails 2.34.x, rubocop-performance 1.26.x, rubocop-packaging 0.5.2, rubocop-rake 0.6.0), plus Yard 0.9.10.x. Metadata was added for bug tracker, changelog, documentation, mailing list, and source code URIs, and the license is now MIT.
(dependencies) · high confidence
Version bump to 4.1.0 and updated test matrix
The gem version has been updated to 4.1.0. The test matrix (Appraisals) has been refreshed to cover Rails 6.1 through 8.1, with specific dependency constraints added for libraries like Capybara, Cucumber, and SQLite3 to ensure compatibility across these versions. Additionally, the Rakefile has been refactored to use Appraisal and RSpec tasks directly, replacing the legacy Jeweler build system, and new configuration files (.rspec, .rubocop.yml) have been added to standardize test execution and code style.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 66 (+1.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 51 → 56 (+5.0)
- Readiness 91 → 91 (+0.0)
- Security 88 → 81 (-6.3)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 11 commits — 11 feature/other, 0 fixes
By area
- .github/workflows — 10 commits
- (root) — 1 commit
Notable commits
- change: Add support for Cucumber version 12 (#621)
- change: Update github/codeql-action action to v4.39.1
- change: Update github/codeql-action action to v4.39.2
- change: Update github/codeql-action action to v4.39.3
- change: Update ruby/setup-ruby action to v1.332.0
- change: Update ruby/setup-ruby action to v1.333.0
- change: Update ruby/setup-ruby action to v1.334.0
- change: Update ruby/setup-ruby action to v1.335.0
- change: Update ruby/setup-ruby action to v1.336.0
- change: Update zizmorcore/zizmor-action action to v0.8.0
- change: Update zizmorcore/zizmor-action action to v0.8.1
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
cucumber/cucumber-rails was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 298032fb0b3b3ca2cd23798e79e388c6ba6df690 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.