Skip to content

Commit

Permalink
Only require example server in specs when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jul 19, 2024
1 parent f4234cb commit 172a90c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

ENV["RACK_ENV"] = ENV["APP_ENV"] = "test"
require "gem_server_conformance/server"
require_relative "support/request_helpers"

RSpec.configure do |config|
Expand Down
2 changes: 2 additions & 0 deletions spec/support/request_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "delegate"
require "forwardable"
require "rubygems/gemcutter_utilities"

module RequestHelpers
Expand Down
2 changes: 2 additions & 0 deletions spec/support/step_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def define!
before(:all) do
@upstream = ENV.fetch("UPSTREAM", nil)
unless upstream
require "gem_server_conformance/server"

@upstream_output = Tempfile.create("upstream.out").path
Bundler.with_original_env do
@upstream = "http://localhost:4567"
Expand Down

0 comments on commit 172a90c

Please sign in to comment.