diff options
author | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-25 12:19:56 +0200 |
---|---|---|
committer | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-25 12:19:56 +0200 |
commit | 80cf688bab7ee3ced619c12ac5e2d6dfb0c78c38 (patch) | |
tree | 8e1e29738a728d7184574517b1fec027f2cabcc1 /spec/install/git_spec.rb | |
parent | 0c459df96d11a917a37fb23262099700abed261f (diff) | |
download | bundler-show-git-rev.tar.gz |
Include revision hash in Source::Git#to_sshow-git-rev
This effectively changes the output of commands that use Source::Git#to_s
(ie. `bundle install`). For example:
Using rack 1.0.0 from git@github.com:rack/rack.git (at master@574b147)
Closes #3433.
Diffstat (limited to 'spec/install/git_spec.rb')
-rw-r--r-- | spec/install/git_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb new file mode 100644 index 0000000000..7067ec4466 --- /dev/null +++ b/spec/install/git_spec.rb @@ -0,0 +1,17 @@ +require "spec_helper" + +describe "bundle install" do + context "git sources" do + it "displays the revision hash of the gem repository" do + build_git "foo", "1.0", :path => lib_path("foo") + + install_gemfile <<-G + gem "foo", :git => "#{lib_path("foo")}" + G + + bundle :install + expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master@#{revision_for(lib_path("foo"))[0..6]})") + should_be_installed "foo 1.0" + end + end +end |