Commit 69d39094 authored by Robert Speicher's avatar Robert Speicher

Override `ROOT_PATH` in specs in a less insane way

parent b9d086e9
ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), "..")) ROOT_PATH = File.expand_path('..', __dir__)
require_relative 'gitlab_config' require_relative 'gitlab_config'
ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), ".."))
require 'simplecov' require 'simplecov'
SimpleCov.start SimpleCov.start
...@@ -13,6 +11,12 @@ VCR.configure do |c| ...@@ -13,6 +11,12 @@ VCR.configure do |c|
c.configure_rspec_metadata! c.configure_rspec_metadata!
end end
RSpec.configure do |config|
config.before(:each) do
stub_const('ROOT_PATH', File.expand_path('..', __dir__))
end
end
# like WEBrick::HTTPServer, but listens on UNIX socket # like WEBrick::HTTPServer, but listens on UNIX socket
class HTTPUNIXServer < WEBrick::HTTPServer class HTTPUNIXServer < WEBrick::HTTPServer
def listen(address, port) def listen(address, port)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment