Skip to content

Commit 3cba31d

Browse files
committed
Fix test setup for devcontainers by configuring hosts
1 parent e9d4d79 commit 3cba31d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/environments/test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,9 @@
7474

7575
# Raise error when a before_action's only/except options reference missing actions.
7676
config.action_controller.raise_on_missing_callback_actions = true
77+
78+
# Allow access to the Rails server through the default test host and the Capybara server.
79+
# These settings are needed for the devcontainer setup.
80+
config.hosts << ActionDispatch::Integration::Session::DEFAULT_HOST
81+
config.hosts << "rails-app:#{ENV['CAPYBARA_SERVER_PORT']}" if ENV['CAPYBARA_SERVER_PORT']
7782
end

0 commit comments

Comments
 (0)