diff options
author | Bundlerbot <bot@bundler.io> | 2019-05-10 05:45:31 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-05-10 05:45:31 +0000 |
commit | a2a69e382de2d35407f59665b5a45a75771bfe65 (patch) | |
tree | 7270e0a4d4813108ab768ae6a259cbda3324701d | |
parent | 3b3eaa9bd444043635a174cf1c7d70d012ed13a4 (diff) | |
parent | 3d94636113db3f373be05514b7ae982db26b42e2 (diff) | |
download | bundler-a2a69e382de2d35407f59665b5a45a75771bfe65.tar.gz |
Merge #7167
7167: Minor spec improvements r=hsbt a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that some specs had harcoded paths from @indirect's file system. :sweat_smile:. These lockfiles are clearly incorrect but specs are not failing.
### What was your diagnosis of the problem?
My diagnosis is that these lockfiles are unnecessary for these tests and don't affect what these tests are testing.
### What is your fix for the problem, implemented in this PR?
My fix is to remove the lockfiles.
As a consequence of the change, the "comment numbering" got messed up. So I removed the numbering while keeping the comments to avoid that problem from happening again in the future.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
-rw-r--r-- | spec/install/gemfile/sources_spec.rb | 51 |
1 files changed, 6 insertions, 45 deletions
diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 8e1205dfa3..da364a51bb 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -471,13 +471,13 @@ RSpec.describe "bundle install with gems on multiple sources" do context "when a single source contains multiple locked gems" do before do - # 1. With these gems, + # With these gems, build_repo4 do build_gem "foo", "0.1" build_gem "bar", "0.1" end - # 2. Installing this gemfile will produce... + # Installing this gemfile... gemfile <<-G source 'file://#{gem_repo1}' gem 'rack' @@ -485,28 +485,9 @@ RSpec.describe "bundle install with gems on multiple sources" do gem 'bar', '~> 0.1', :source => 'file://#{gem_repo4}' G - # 3. this lockfile. - lockfile <<-L - GEM - remote: file:/Users/andre/src/bundler/bundler/tmp/gems/remote1/ - remote: file:/Users/andre/src/bundler/bundler/tmp/gems/remote4/ - specs: - bar (0.1) - foo (0.1) - rack (1.0.0) - - PLATFORMS - ruby - - DEPENDENCIES - bar (~> 0.1)! - foo (~> 0.1)! - rack - L - bundle! :install, forgotten_command_line_options(:path => "../gems/system") - # 4. Then we add some new versions... + # And then we add some new versions... update_repo4 do build_gem "foo", "0.2" build_gem "bar", "0.3" @@ -514,7 +495,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end it "allows them to be unlocked separately" do - # 5. and install this gemfile, updating only foo. + # And install this gemfile, updating only foo. install_gemfile <<-G source 'file://#{gem_repo1}' gem 'rack' @@ -522,7 +503,7 @@ RSpec.describe "bundle install with gems on multiple sources" do gem 'bar', '~> 0.1', :source => 'file://#{gem_repo4}' G - # 6. Which should update foo to 0.2, but not the (locked) bar 0.1 + # It should update foo to 0.2, but not the (locked) bar 0.1 expect(the_bundle).to include_gems("foo 0.2", "bar 0.1") end end @@ -578,7 +559,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end # When this gemfile is installed... - gemfile <<-G + install_gemfile <<-G source "#{source_uri}" source "#{second_uri}" do @@ -588,26 +569,6 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "rack-obama" G - # It creates this lockfile. - lockfile <<-L - GEM - remote: #{source_uri}/ - remote: #{second_uri}/ - specs: - rack (2.0.1.1.forked) - rack-obama (1.0) - rack - thor (0.19.1.1.forked) - - PLATFORMS - ruby - - DEPENDENCIES - rack (= 2.0.1.1.forked)! - rack-obama - thor! - L - # Then we change the Gemfile by adding a version to thor gemfile <<-G source "#{source_uri}" |