diff options
-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 2e2cbd0819..5fd587dbba 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 |