diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-02-09 20:05:03 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-02-09 20:05:03 +0900 |
commit | 298c4b421d3c8006a254b9ba52241ef9f30fa853 (patch) | |
tree | ef700bb2f893eaf8ad37eb45615983a42e92a71f | |
parent | eddcb6c9a8bfdf07efd4ae92c04c145df60761a4 (diff) | |
download | bundler-298c4b421d3c8006a254b9ba52241ef9f30fa853.tar.gz |
Workaround when BUNDLER_SPEC_SUB_VERSION is available.
-rw-r--r-- | spec/commands/binstubs_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 0b3029b51f..ed8ff9544d 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -102,9 +102,15 @@ RSpec.describe "bundle binstubs <gem>" do let(:system_bundler_version) { Gem::Version.new(Bundler::VERSION).bump.to_s } - it "runs bundler" do - sys_exec! "#{bundled_app("bin/bundle")} install" - expect(out).to eq %(system bundler #{system_bundler_version}\n["install"]) + context "when system bundler was used" do + # Support master branch of bundler + if ENV["BUNDLER_SPEC_SUB_VERSION"] + let(:system_bundler_version) { Bundler::VERSION } + end + it "runs bundler" do + sys_exec! "#{bundled_app("bin/bundle")} install" + expect(out).to eq %(system bundler #{system_bundler_version}\n["install"]) + end end context "when BUNDLER_VERSION is set" do |