diff options
author | Michael Pitman <michaelp@ibglobalweb.com> | 2017-08-30 15:14:40 +1000 |
---|---|---|
committer | Michael Pitman <michaelp@ibglobalweb.com> | 2017-08-30 15:14:40 +1000 |
commit | bb817c6f0344fcee2c7310eaca250abee4819c2b (patch) | |
tree | 11e1043e5f673baaaaf8d959b13d42a012b4fa85 /spec/bundler/shared_helpers_spec.rb | |
parent | afee7beee02f1005c731448ef1797d59c8b17534 (diff) | |
download | bundler-bb817c6f0344fcee2c7310eaca250abee4819c2b.tar.gz |
Stub the new rubygems integration method, rather than the underlying Gem method in the bundle path regex specs
Diffstat (limited to 'spec/bundler/shared_helpers_spec.rb')
-rw-r--r-- | spec/bundler/shared_helpers_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index 0492ec39e6..b8f099d5ba 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -283,13 +283,13 @@ RSpec.describe Bundler::SharedHelpers do # In versions of jruby that supported ruby 1.8, the path separator was the standard File::PATH_SEPARATOR let(:regex) { Regexp.new("(?<!jar:file|jar|file|classpath|uri:classloader|uri|http|https):") } it "does not exit if bundle path is the standard uri path" do - allow(Gem).to receive(:path_separator).and_return(regex) + allow(Bundler.rubygems).to receive(:path_separator).and_return(regex) allow(Bundler).to receive(:bundle_path) { Pathname.new("uri:classloader:/WEB-INF/gems") } expect { subject.send(:validate_bundle_path) }.not_to raise_error end it "exits if bundle path contains another directory" do - allow(Gem).to receive(:path_separator).and_return(regex) + allow(Bundler.rubygems).to receive(:path_separator).and_return(regex) allow(Bundler).to receive(:bundle_path) { Pathname.new("uri:classloader:/WEB-INF/gems:other/dir") } |