
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Cucumber-Rails brings Cucumber to Rails 5.2, 6.x, 7.x, and 8.x.
Before you can use the generator, add the gem to your project's Gemfile as follows:
group :test do
gem 'cucumber-rails', require: false
# database_cleaner is not required, but highly recommended
gem 'database_cleaner'
end
Then install it by running:
bundle install
Learn about the various options:
rails generate cucumber:install --help
Finally, bootstrap your Rails app, for example:
rails generate cucumber:install
[bundle exec] cucumber
By default, cucumber-rails runs DatabaseCleaner.start
and DatabaseCleaner.clean
before and after your scenarios. You can disable this behaviour like so:
# features/support/env.rb
# ...
Cucumber::Rails::Database.autorun_database_cleaner = false
By default, cucumber-rails will auto mix-in the helpers from Rack::Test
into your default Cucumber World instance.
You can prevent this behaviour like so:
# features/support/env.rb
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
When upgrading from a previous version it is recommended that you rerun:
rails generate cucumber:install
The only way to have a bug fixed or a new feature accepted is to describe it with a Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator. Fork this project, clone it to your workstation and check out a branch with a descriptive name:
git clone git@github.com:you/cucumber-rails.git
git checkout -b bugfix/generator-fails-on-bundle-exec
Start by making sure you can run the existing features. Now, create a feature that demonstrates what's wrong. See the existing features for examples. When you have a failing feature that reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team will review it and hopefully create a fix.
If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request.
Make sure you have a supported ruby installed, cd into your cucumber-rails
repository and run
gem install bundler
bundle install
bin/install_geckodriver.sh
bin/install_webpacker.sh
With all dependencies installed, all specs and features should pass:
[bundle exec] rake
In order to test against multiple versions of key dependencies, the Appraisal
gem is used to generate multiple gemfiles, stored in the gemfiles/
directory.
Normally these will only run on GitHub via GitHub Actions; however if you want to run the full test
suite against all gemfiles, run the following commands:
[bundle exec] appraisal install
[bundle exec] appraisal rake test
To run the suite against a named gemfile, use the following:
[bundle exec] appraisal rails_6_0 rake test
To support the multiple-gemfile testing, when adding a new dependency the following rules apply:
Gemfile
For example, rspec is a primary development dependency, so it lives in the gemspec.
FAQs
Unknown package
We found that cucumber-rails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.