summaryrefslogtreecommitdiff
path: root/spec/bundler/support/artifice/windows.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/support/artifice/windows.rb')
-rw-r--r--spec/bundler/support/artifice/windows.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/bundler/support/artifice/windows.rb b/spec/bundler/support/artifice/windows.rb
index f5b4baae30..fea991c071 100644
--- a/spec/bundler/support/artifice/windows.rb
+++ b/spec/bundler/support/artifice/windows.rb
@@ -2,19 +2,16 @@
require_relative "../path"
-$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra,ruby2_keywords}-*/lib")].map(&:to_s))
+$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gem_path.join("gems/{mustermann,rack,tilt,sinatra,ruby2_keywords,base64}-*/lib")].map(&:to_s))
-require "artifice"
require "sinatra/base"
-Artifice.deactivate
-
class Windows < Sinatra::Base
set :raise_errors, true
set :show_exceptions, false
helpers do
- def gem_repo
+ def default_gem_repo
Pathname.new(ENV["BUNDLER_SPEC_GEM_REPO"] || Spec::Path.gem_repo1)
end
end
@@ -26,7 +23,7 @@ class Windows < Sinatra::Base
files.each do |file|
get "/#{file}" do
- File.binread gem_repo.join(file)
+ File.binread default_gem_repo.join(file)
end
end
@@ -43,4 +40,6 @@ class Windows < Sinatra::Base
end
end
+require_relative "helpers/artifice"
+
Artifice.activate_with(Windows)