From f8a04c45d3e923c40c0ecbb68bef4e320d295903 Mon Sep 17 00:00:00 2001 From: Erik Axel Nielsen Date: Mon, 8 Sep 2025 12:08:23 +0200 Subject: [PATCH] Stop printing a warning about `config.cache_classes` being set to `false` The initial warning was from 16 years ago from a bug report that no longer exists, for Rails 2 and is no longer relevant. --- CHANGELOG.md | 2 ++ lib/cucumber/rails.rb | 10 ---------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e98770c5..a1d52fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This file is intended to be modified using the [`changelog`](https://github.com/cucumber/changelog) command-line tool. ## [Unreleased] +### Removed +- Stop printing a warning about `config.cache_classes` being set to `false` ## [4.0.0] - 2025-09-01 ### Changed diff --git a/lib/cucumber/rails.rb b/lib/cucumber/rails.rb index 858693bb..d62965eb 100644 --- a/lib/cucumber/rails.rb +++ b/lib/cucumber/rails.rb @@ -12,16 +12,6 @@ require File.expand_path("#{ENV.fetch('RAILS_ROOT')}/config/environment") require 'cucumber/rails/action_dispatch' require 'rails/test_help' - - unless Rails.application.config.cache_classes || defined?(Spring) - warn <<~MESSAGE - WARNING: You have set Rails' config.cache_classes to false (Spring needs cache_classes set to false). - This is known to cause problems with database transactions. - - Set config.cache_classes to true if you want to use transactions. - MESSAGE - end - require 'cucumber/rails/world' require 'cucumber/rails/hooks' require 'cucumber/rails/capybara'