Skip to content

Commit a3ff611

Browse files
committed
Require capybara >= 3.40 for Rack 3
This dependabot bump re-resolved rack from 2.2.23 to 3.2.6, which removed the Rack::Handler namespace. Capybara 3.39.2 hardcodes Rack::Handler::Puma when booting its test server, and puma 7 only registers its handler under Rackup::Handler::Puma when Rack 3 is loaded, so every spec that booted the Capybara server failed with `uninitialized constant Rack::Handler`. Capybara 3.40.0 falls back to Rackup::Handler::Puma. Gemfile.next.lock was already on 3.40.0, which is why the rails-next build stayed green.
1 parent 1b53e4a commit a3ff611

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ end
8585

8686
group :test do
8787
gem "apparition", git: "https://github.com/twalpole/apparition.git", ref: "7db58cc6b0e4ca4141b074ff27d5936a1b8874bf"
88-
gem "capybara"
88+
# 3.40+ needed for Rack 3: earlier versions reference the removed
89+
# Rack::Handler::Puma constant when booting the test server
90+
gem "capybara", ">= 3.40"
8991
gem "webdrivers"
9092
gem "database_cleaner-active_record", ">= 2.1.0"
9193
gem "capybara-screenshot"

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ GEM
104104
thor (~> 1.0)
105105
builder (3.3.0)
106106
byebug (11.1.3)
107-
capybara (3.39.2)
107+
capybara (3.40.0)
108108
addressable
109109
matrix
110110
mini_mime (>= 0.1.3)
111-
nokogiri (~> 1.8)
111+
nokogiri (~> 1.11)
112112
rack (>= 1.6.0)
113113
rack-test (>= 0.6.3)
114114
regexp_parser (>= 1.5, < 3.0)
@@ -528,7 +528,7 @@ DEPENDENCIES
528528
bootstrap-sass (= 3.4.1)
529529
bourbon
530530
byebug
531-
capybara
531+
capybara (>= 3.40)
532532
capybara-screenshot
533533
coffee-script
534534
csv

Gemfile.next.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ DEPENDENCIES
559559
bootstrap-sass (= 3.4.1)
560560
bourbon
561561
byebug
562-
capybara
562+
capybara (>= 3.40)
563563
capybara-screenshot
564564
coffee-script
565565
csv

0 commit comments

Comments
 (0)