summaryrefslogtreecommitdiff
path: root/spec/support/hax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/hax.rb')
-rw-r--r--spec/support/hax.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/hax.rb b/spec/support/hax.rb
index 2cca22c6ab..663d3527c5 100644
--- a/spec/support/hax.rb
+++ b/spec/support/hax.rb
@@ -1,12 +1,16 @@
# frozen_string_literal: true
require "rubygems"
-class Gem::Platform
- @local = new(ENV["BUNDLER_SPEC_PLATFORM"]) if ENV["BUNDLER_SPEC_PLATFORM"]
+module Gem
+ class Platform
+ @local = new(ENV["BUNDLER_SPEC_PLATFORM"]) if ENV["BUNDLER_SPEC_PLATFORM"]
+ end
+ @platforms = [Gem::Platform::RUBY, Gem::Platform.local]
end
if ENV["BUNDLER_SPEC_VERSION"]
module Bundler
+ remove_const(:VERSION) if const_defined?(:VERSION)
VERSION = ENV["BUNDLER_SPEC_VERSION"].dup
end
end