File: 0005-spec_helper-set-RACK_ENV-to-test.patch

package info (click to toggle)
ruby-capybara 3.40.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,368 kB
  • sloc: ruby: 23,988; javascript: 752; makefile: 11
file content (24 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Antonio Terceiro <terceiro@debian.org>
Date: Thu, 30 Jan 2025 16:33:50 +0100
Subject: spec_helper: set RACK_ENV to test

This will disable the Host authorization middleware that is enabled by
default by Sinatra 4.1 when in a development environment.

Forwarded: no
---
 spec/spec_helper.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 1ed4ed0..dba7043 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,5 +1,7 @@
 # frozen_string_literal: true
 
+ENV['RACK_ENV'] = 'test'
+
 require 'rspec/expectations'
 require 'webdrivers' if ENV.fetch('WEBDRIVERS', nil)
 if ENV['TRAVIS']