Skip to content

Commit 46cd9be

Browse files
committed
Dont't use Bundler::VERSION
1 parent 57cfe7c commit 46cd9be

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

bundler/spec/runtime/self_management_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"2.3.0"
77
end
88

9+
let(:current_version) do
10+
"2.4.0"
11+
end
12+
913
before do
1014
build_repo2
1115

@@ -104,14 +108,14 @@
104108
end
105109

106110
it "installs BUNDLE_VERSION version when using bundle config version x.y.z" do
107-
lockfile_bundled_with(Bundler::VERSION.gsub(/\.dev/, ""))
111+
lockfile_bundled_with(current_version)
108112

109113
bundle "config set --local version #{previous_minor}"
110114
bundle "install", :artifice => "vcr"
111115
expect(out).to include("Bundler #{Bundler::VERSION} is running, but your configuration was #{previous_minor}. Installing Bundler #{previous_minor} and restarting using that version.")
112116

113117
bundle "-v"
114-
expect(out).to eq(Bundler::VERSION[0] == "2" ? "Bundler version #{previous_minor}" : previous_minor)
118+
expect(out).to eq(previous_minor[0] == "2" ? "Bundler version #{previous_minor}" : previous_minor)
115119
end
116120

117121
it "does not try to install when using bundle config version global" do

0 commit comments

Comments
 (0)