ruby/spec/bundler/commands/version_spec.rb
hsbt 91533d9ab1 Downgrade Bundler 1.17.x from 2.0.0.
We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 03:07:37 +00:00

39 lines
1.1 KiB
Ruby

# frozen_string_literal: true
RSpec.describe "bundle version" do
context "with -v" do
it "outputs the version", :bundler => "< 2" do
bundle! "-v"
expect(out).to eq("Bundler version #{Bundler::VERSION}")
end
it "outputs the version", :bundler => "2" do
bundle! "-v"
expect(out).to eq(Bundler::VERSION)
end
end
context "with --version" do
it "outputs the version", :bundler => "< 2" do
bundle! "--version"
expect(out).to eq("Bundler version #{Bundler::VERSION}")
end
it "outputs the version", :bundler => "2" do
bundle! "--version"
expect(out).to eq(Bundler::VERSION)
end
end
context "with version" do
it "outputs the version with build metadata", :bundler => "< 2" do
bundle! "version"
expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/)
end
it "outputs the version with build metadata", :bundler => "2" do
bundle! "version"
expect(out).to match(/\A#{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit [a-fA-F0-9]{7,}\)\z/)
end
end
end