diff options
Diffstat (limited to 'spec/install')
-rw-r--r-- | spec/install/deploy_spec.rb | 4 | ||||
-rw-r--r-- | spec/install/git_spec.rb | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index ea85229eb8..88832f2145 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -207,7 +207,7 @@ describe "install with --deployment or --frozen" do bundle "install --deployment" expect(out).to include("deployment mode") - expect(out).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master)") + expect(out).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")} (at master@#{revision_for(lib_path("rack-1.0"))[0..6]}") expect(out).not_to include("You have added to the Gemfile") expect(out).not_to include("You have changed in the Gemfile") end @@ -230,7 +230,7 @@ describe "install with --deployment or --frozen" do bundle "install --deployment" expect(out).to include("deployment mode") - expect(out).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master)`") + expect(out).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")} (at master@#{revision_for(lib_path("rack"))[0..6]})`") expect(out).not_to include("You have added to the Gemfile") expect(out).not_to include("You have deleted from the Gemfile") end 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 |