summaryrefslogtreecommitdiff
path: root/spec/bundler/env_spec.rb
diff options
context:
space:
mode:
authorNick LaMuro <nicklamuro@gmail.com>2016-07-25 18:56:46 -0500
committerNick LaMuro <nicklamuro@gmail.com>2016-07-25 21:44:02 -0500
commit06ab91386db8d493d512bd32b8fad9ca2b4c4b0f (patch)
tree47740092913d5115c16327ade722c6d7264effa2 /spec/bundler/env_spec.rb
parent75f1f1757f6e169b3b6c3481f74e9033956c704b (diff)
downloadbundler-06ab91386db8d493d512bd32b8fad9ca2b4c4b0f.tar.gz
Use .full_version in Bundler::Env
Diffstat (limited to 'spec/bundler/env_spec.rb')
-rw-r--r--spec/bundler/env_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/bundler/env_spec.rb b/spec/bundler/env_spec.rb
index 305fcce351..73d1f1d7df 100644
--- a/spec/bundler/env_spec.rb
+++ b/spec/bundler/env_spec.rb
@@ -3,7 +3,8 @@ require "spec_helper"
require "bundler/settings"
describe Bundler::Env do
- let(:env) { described_class.new }
+ let(:env) { described_class.new }
+ let(:git_proxy_stub) { Bundler::Source::Git::GitProxy.new(nil, nil, nil) }
describe "#report" do
it "prints the environment" do
@@ -72,5 +73,15 @@ describe Bundler::Env do
expect(output).to include(gemspec)
end
end
+
+ context "when the git version is OS specific" do
+ it "includes OS specific information with the version number" do
+ expect(git_proxy_stub).to receive(:git).with("--version").
+ and_return("git version 1.2.3 (Apple Git-BS)")
+ expect(Bundler::Source::Git::GitProxy).to receive(:new).and_return(git_proxy_stub)
+
+ expect(env.report).to include("Git 1.2.3 (Apple Git-BS)")
+ end
+ end
end
end