diff options
author | Caden Lovelace <caden@herostrat.us> | 2015-08-23 23:50:14 +0100 |
---|---|---|
committer | Caden Lovelace <caden@herostrat.us> | 2015-08-23 23:50:14 +0100 |
commit | ac30a5b8f1c23ab5d4ac19345f2a45aaa83dcd0d (patch) | |
tree | 748bb6201b5b8afdda97bd623b99f166e546a9cf | |
parent | 99078ec8eb8ec49f8978516e2a838a3d4871cb3f (diff) | |
download | bundler-ac30a5b8f1c23ab5d4ac19345f2a45aaa83dcd0d.tar.gz |
fixup! Add test for updating gems on source when source differs to name
-rw-r--r-- | spec/update/git_spec.rb | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index 2e2cbd08..5fd587db 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -278,56 +278,56 @@ describe "bundle update" do bundle "update --source foo" should_be_installed "rack 1.0" end + end - context "when the gem and the repository have different names" do - before :each do - build_repo2 - @git = build_git "foo", :path => lib_path("bar") + context "when the gem and the repository have different names" do + before :each do + build_repo2 + @git = build_git "foo", :path => lib_path("bar") - install_gemfile <<-G - source "file://#{gem_repo2}" - git "#{lib_path("bar")}" do - gem 'foo' - end - gem 'rack' - G - end + install_gemfile <<-G + source "file://#{gem_repo2}" + git "#{lib_path("bar")}" do + gem 'foo' + end + gem 'rack' + G + end - it "updates version of gems that were originally pulled in by the source" do - spec_lines = lib_path("foo/foo.gemspec").read.split("\n") - spec_lines[5] = "s.version = '2.0'" + it "the --source flag updates version of gems that were originally pulled in by the source" do + spec_lines = lib_path("bar/foo.gemspec").read.split("\n") + spec_lines[5] = "s.version = '2.0'" - update_git "foo", "2.0", :path => @git.path do |s| - s.write "foo.gemspec", spec_lines.join("\n") - end + update_git "foo", "2.0", :path => @git.path do |s| + s.write "foo.gemspec", spec_lines.join("\n") + end - ref = @git.ref_for "master" + ref = @git.ref_for "master" - bundle "update --source bar" + bundle "update --source bar" - lockfile_should_be <<-G - GIT - remote: #{@git.path} - revision: #{ref} - specs: - foo (2.0) + lockfile_should_be <<-G + GIT + remote: #{@git.path} + revision: #{ref} + specs: + foo (2.0) - GEM - remote: file:#{gem_repo2}/ - specs: - rack (1.0.0) + GEM + remote: file:#{gem_repo2}/ + specs: + rack (1.0.0) - PLATFORMS - ruby + PLATFORMS + ruby - DEPENDENCIES - foo! - rack + DEPENDENCIES + foo! + rack - BUNDLED WITH - #{Bundler::VERSION} - G - end + BUNDLED WITH + #{Bundler::VERSION} + G end end end |