summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index d93f88d..7b7b1b7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,5 +1,3 @@
-ROOT_PATH = File.expand_path(File.join(File.dirname(__FILE__), ".."))
-
require 'simplecov'
SimpleCov.start
@@ -13,6 +11,12 @@ VCR.configure do |c|
c.configure_rspec_metadata!
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
class HTTPUNIXServer < WEBrick::HTTPServer
def listen(address, port)