summaryrefslogtreecommitdiff
path: root/spec/bundler/commands
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-07-25 01:27:02 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-07-27 09:25:57 +0900
commit2f9e0cf1819b8679abe79494f622e1a42d7e021d (patch)
tree6ea1693b78ff3769dde6f7c5a24d2547c26f755e /spec/bundler/commands
parentb500e8fab445d5a4ad91fd71e622aff88d0c7dd6 (diff)
[rubygems/rubygems] Explicitly define a global source for tests
This is in preparation for deprecating source-less gemfiles. https://github.com/rubygems/rubygems/commit/d6493fa3e2
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r--spec/bundler/commands/binstubs_spec.rb2
-rw-r--r--spec/bundler/commands/check_spec.rb3
-rw-r--r--spec/bundler/commands/clean_spec.rb3
-rw-r--r--spec/bundler/commands/config_spec.rb2
-rw-r--r--spec/bundler/commands/exec_spec.rb56
-rw-r--r--spec/bundler/commands/info_spec.rb4
-rw-r--r--spec/bundler/commands/install_spec.rb10
-rw-r--r--spec/bundler/commands/open_spec.rb1
-rw-r--r--spec/bundler/commands/update_spec.rb20
9 files changed, 79 insertions, 22 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb
index 2006485fca..fb5da98bf3 100644
--- a/spec/bundler/commands/binstubs_spec.rb
+++ b/spec/bundler/commands/binstubs_spec.rb
@@ -261,6 +261,7 @@ RSpec.describe "bundle binstubs <gem>" do
s.executables = %w[foo]
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => "#{lib_path("foo")}"
G
@@ -276,6 +277,7 @@ RSpec.describe "bundle binstubs <gem>" do
s.executables = %w[foo]
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :path => "#{lib_path("foo")}"
G
diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb
index 88950cef85..c48220f8df 100644
--- a/spec/bundler/commands/check_spec.rb
+++ b/spec/bundler/commands/check_spec.rb
@@ -319,6 +319,7 @@ RSpec.describe "bundle check" do
describe "when using only scoped rubygems sources" do
before do
gemfile <<~G
+ source "#{file_uri_for(gem_repo2)}"
source "#{file_uri_for(gem_repo1)}" do
gem "rack"
end
@@ -343,6 +344,7 @@ RSpec.describe "bundle check" do
end
gemfile <<~G
+ source "#{file_uri_for(gem_repo1)}"
source "#{file_uri_for(gem_repo4)}" do
gem "depends_on_rack"
end
@@ -355,6 +357,7 @@ RSpec.describe "bundle check" do
expect(out).to include("The Gemfile's dependencies are satisfied")
expect(lockfile).to eq <<~L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
GEM
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb
index 1889f6a197..4c04853bd3 100644
--- a/spec/bundler/commands/clean_spec.rb
+++ b/spec/bundler/commands/clean_spec.rb
@@ -261,6 +261,7 @@ RSpec.describe "bundle clean" do
revision = revision_for(lib_path("rails"))
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "activesupport", :git => "#{lib_path("rails")}", :ref => '#{revision}'
G
@@ -869,6 +870,7 @@ RSpec.describe "bundle clean" do
expect(very_simple_binary_extensions_dir).to exist
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "very_simple_git_binary", :git => "#{lib_path("very_simple_git_binary-1.0")}", :ref => "#{revision}"
G
@@ -878,6 +880,7 @@ RSpec.describe "bundle clean" do
expect(very_simple_binary_extensions_dir).to exist
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
G
bundle "install"
diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb
index 2f4488a552..1ef84c8195 100644
--- a/spec/bundler/commands/config_spec.rb
+++ b/spec/bundler/commands/config_spec.rb
@@ -321,7 +321,7 @@ E
end
describe "quoting" do
- before(:each) { gemfile "# no gems" }
+ before(:each) { gemfile "source \"#{file_uri_for(gem_repo1)}\"" }
let(:long_string) do
"--with-xml2-include=/usr/pkg/include/libxml2 --with-xml2-lib=/usr/pkg/lib " \
"--with-xslt-dir=/usr/pkg"
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb
index 39430d52a4..2c83ec8e11 100644
--- a/spec/bundler/commands/exec_spec.rb
+++ b/spec/bundler/commands/exec_spec.rb
@@ -8,6 +8,7 @@ RSpec.describe "bundle exec" do
it "works with --gemfile flag" do
create_file "CustomGemfile", <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack", "1.0.0"
G
@@ -17,6 +18,7 @@ RSpec.describe "bundle exec" do
it "activates the correct gem" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack", "0.9.1"
G
@@ -26,6 +28,7 @@ RSpec.describe "bundle exec" do
it "works and prints no warnings when HOME is not writable" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack", "0.9.1"
G
@@ -36,6 +39,7 @@ RSpec.describe "bundle exec" do
it "works when the bins are in ~/.bundle" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -45,6 +49,7 @@ RSpec.describe "bundle exec" do
it "works when running from a random directory" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -54,37 +59,39 @@ RSpec.describe "bundle exec" do
end
it "works when exec'ing something else" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec echo exec"
expect(out).to eq("exec")
end
it "works when exec'ing to ruby" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec ruby -e 'puts %{hi}'"
expect(out).to eq("hi")
end
it "works when exec'ing to rubygems" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec #{gem_cmd} --version"
expect(out).to eq(Gem::VERSION)
end
it "works when exec'ing to rubygems through sh -c" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec sh -c '#{gem_cmd} --version'"
expect(out).to eq(Gem::VERSION)
end
it "works when exec'ing back to bundler with a lockfile that doesn't include the current platform" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack", "0.9.1"
G
# simulate lockfile generated with old version not including specific platform
lockfile <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
rack (0.9.1)
@@ -110,20 +117,20 @@ RSpec.describe "bundle exec" do
Process.setproctitle("1-2-3-4-5-6-7")
puts `ps -ocommand= -p#{$$}`
RUBY
- create_file "Gemfile"
+ create_file "Gemfile", "source \"#{file_uri_for(gem_repo1)}\""
create_file "a.rb", script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility
bundle "exec ruby a.rb"
expect(out).to eq("1-2-3-4-5-6-7")
end
it "accepts --verbose" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec --verbose echo foobar"
expect(out).to eq("foobar")
end
it "passes --verbose to command if it is given after the command" do
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
bundle "exec echo --verbose"
expect(out).to eq("--verbose")
end
@@ -147,7 +154,7 @@ RSpec.describe "bundle exec" do
end
G
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
sys_exec "#{Gem.ruby} #{command.path}"
expect(out).to be_empty
@@ -155,7 +162,7 @@ RSpec.describe "bundle exec" do
end
it "accepts --keep-file-descriptors" do
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
bundle "exec --keep-file-descriptors echo foobar"
expect(err).to be_empty
@@ -164,7 +171,7 @@ RSpec.describe "bundle exec" do
it "can run a command named --verbose" do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
- install_gemfile 'gem "rack"'
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem \"rack\""
File.open(bundled_app("--verbose"), "w") do |f|
f.puts "#!/bin/sh"
f.puts "echo foobar"
@@ -210,7 +217,7 @@ RSpec.describe "bundle exec" do
before do
skip "irb isn't a default gem" if default_irb_version.empty?
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
end
it "uses version provided by ruby" do
@@ -325,6 +332,7 @@ RSpec.describe "bundle exec" do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -343,6 +351,7 @@ RSpec.describe "bundle exec" do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -359,6 +368,7 @@ RSpec.describe "bundle exec" do
it "errors nicely when the argument doesn't exist" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -370,6 +380,7 @@ RSpec.describe "bundle exec" do
it "errors nicely when the argument is not executable" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -381,6 +392,7 @@ RSpec.describe "bundle exec" do
it "errors nicely when no arguments are passed" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -412,6 +424,7 @@ RSpec.describe "bundle exec" do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -496,6 +509,7 @@ RSpec.describe "bundle exec" do
describe "run from a random directory" do
before(:each) do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
end
@@ -519,6 +533,7 @@ RSpec.describe "bundle exec" do
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "fizz", :path => "#{File.expand_path(home("fizz"))}"
G
end
@@ -543,6 +558,7 @@ RSpec.describe "bundle exec" do
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "fizz_git", :git => "#{lib_path("fizz_git-1.0")}"
G
end
@@ -566,6 +582,7 @@ RSpec.describe "bundle exec" do
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "fizz_no_gemspec", "1.0", :git => "#{lib_path("fizz_no_gemspec-1.0")}"
G
end
@@ -612,6 +629,7 @@ RSpec.describe "bundle exec" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :path => "#{lib_path("foo-1.0")}"
G
@@ -627,6 +645,8 @@ RSpec.describe "bundle exec" do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+
module Monkey
def bin_path(a,b,c)
raise Gem::GemNotFoundException.new('Fail')
@@ -660,6 +680,7 @@ RSpec.describe "bundle exec" do
bundled_app(path).chmod(0o755)
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
end
@@ -806,6 +827,7 @@ RSpec.describe "bundle exec" do
context "when Bundler.setup fails", :bundler => "< 3" do
before do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem 'rack', '2'
G
ENV["BUNDLER_FORCE_TTY"] = "true"
@@ -814,7 +836,7 @@ RSpec.describe "bundle exec" do
let(:exit_code) { Bundler::GemNotFound.new.status_code }
let(:expected) { "" }
let(:expected_err) { <<-EOS.strip }
-\e[31mCould not find gem 'rack (= 2)' in locally installed gems.
+\e[31mCould not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally.
The source contains the following versions of 'rack': 0.9.1, 1.0.0\e[0m
\e[33mRun `bundle install` to install missing gems.\e[0m
EOS
@@ -832,6 +854,7 @@ The source contains the following versions of 'rack': 0.9.1, 1.0.0\e[0m
context "when Bundler.setup fails", :bundler => "3" do
before do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem 'rack', '2'
G
ENV["BUNDLER_FORCE_TTY"] = "true"
@@ -840,7 +863,7 @@ The source contains the following versions of 'rack': 0.9.1, 1.0.0\e[0m
let(:exit_code) { Bundler::GemNotFound.new.status_code }
let(:expected) { "" }
let(:expected_err) { <<-EOS.strip }
-\e[31mCould not find gem 'rack (= 2)' in locally installed gems.
+\e[31mCould not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally.
The source contains the following versions of 'rack': 1.0.0\e[0m
\e[33mRun `bundle install` to install missing gems.\e[0m
EOS
@@ -1020,7 +1043,7 @@ __FILE__: #{path.to_s.inspect}
before do
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
end
it "does not undo the monkeypatches" do
@@ -1079,7 +1102,7 @@ __FILE__: #{path.to_s.inspect}
RUBY
# A Gemfile needs to be in the root to trick bundler's root resolution
- create_file(bundled_app("Gemfile"))
+ create_file(bundled_app("Gemfile"), "source \"#{file_uri_for(gem_repo1)}\"")
bundle "install"
end
@@ -1110,7 +1133,7 @@ __FILE__: #{path.to_s.inspect}
skip "https://github.com/rubygems/rubygems/issues/3351" if Gem.win_platform?
skip "openssl isn't a default gem" if expected.empty?
- install_gemfile "" # must happen before installing the broken system gem
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"" # must happen before installing the broken system gem
build_repo4 do
build_gem "openssl", openssl_version do |s|
@@ -1151,6 +1174,7 @@ __FILE__: #{path.to_s.inspect}
build_git "simple_git_binary", &:add_c_extension
bundle "config set --local path .bundle"
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "simple_git_binary", :git => '#{lib_path("simple_git_binary-1.0")}'
G
end
diff --git a/spec/bundler/commands/info_spec.rb b/spec/bundler/commands/info_spec.rb
index daed4587d5..906349cacf 100644
--- a/spec/bundler/commands/info_spec.rb
+++ b/spec/bundler/commands/info_spec.rb
@@ -111,6 +111,7 @@ RSpec.describe "bundle info" do
it "prints out git info" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => "#{lib_path("foo-1.0")}"
G
expect(the_bundle).to include_gems "foo 1.0"
@@ -126,6 +127,7 @@ RSpec.describe "bundle info" do
@revision = revision_for(lib_path("foo-1.0"))[0...6]
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => "#{lib_path("foo-1.0")}", :branch => "omg"
G
expect(the_bundle).to include_gems "foo 1.0.omg"
@@ -137,6 +139,7 @@ RSpec.describe "bundle info" do
it "doesn't print the branch when tied to a ref" do
sha = revision_for(lib_path("foo-1.0"))
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}"
G
@@ -147,6 +150,7 @@ RSpec.describe "bundle info" do
it "handles when a version is a '-' prerelease" do
@git = build_git("foo", "1.0.0-beta.1", :path => lib_path("foo"))
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", "1.0.0-beta.1", :git => "#{lib_path("foo")}"
G
expect(the_bundle).to include_gems "foo 1.0.0.pre.beta.1"
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 789fd9b5c0..e6ae21eafb 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -331,6 +331,7 @@ RSpec.describe "bundle install with gem sources" do
it "gives a useful error if no sources are set" do
install_gemfile <<-G, :raise_on_error => false
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -339,6 +340,7 @@ RSpec.describe "bundle install with gem sources" do
it "creates a Gemfile.lock on a blank Gemfile" do
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
G
expect(File.exist?(bundled_app_lock)).to eq(true)
@@ -482,6 +484,7 @@ RSpec.describe "bundle install with gem sources" do
install_gemfile <<-G, :raise_on_error => false
::RUBY_VERSION = '2.0.1'
ruby '~> 2.2'
+ source "#{file_uri_for(gem_repo1)}"
G
expect(err).to include("Your Ruby version is 2.0.1, but your Gemfile specified ~> 2.2")
end
@@ -493,12 +496,14 @@ RSpec.describe "bundle install with gem sources" do
::RUBY_VERSION = '2.1.3'
::RUBY_PATCHLEVEL = 100
ruby '~> 2.1.0'
+ source "#{file_uri_for(gem_repo1)}"
G
end
it "writes current Ruby version to Gemfile.lock" do
lockfile_should_be <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
PLATFORMS
@@ -519,10 +524,12 @@ RSpec.describe "bundle install with gem sources" do
::RUBY_VERSION = '2.2.3'
::RUBY_PATCHLEVEL = 100
ruby '~> 2.2.0'
+ source "#{file_uri_for(gem_repo1)}"
G
lockfile_should_be <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
PLATFORMS
@@ -540,6 +547,7 @@ RSpec.describe "bundle install with gem sources" do
it "does not crash when unlocking" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
ruby '>= 2.1.0'
G
@@ -558,6 +566,7 @@ RSpec.describe "bundle install with gem sources" do
build_lib "foo"
gemfile = <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem 'foo', :path => "#{lib_path("foo-1.0")}"
G
File.open("#{root_dir}/Gemfile", "w") do |file|
@@ -574,6 +583,7 @@ RSpec.describe "bundle install with gem sources" do
build_lib "foo", :path => root_dir
gemfile = <<-G
+ source "#{file_uri_for(gem_repo1)}"
gemspec
G
File.open("#{root_dir}/Gemfile", "w") do |file|
diff --git a/spec/bundler/commands/open_spec.rb b/spec/bundler/commands/open_spec.rb
index d18e620783..53dc35c2c7 100644
--- a/spec/bundler/commands/open_spec.rb
+++ b/spec/bundler/commands/open_spec.rb
@@ -105,6 +105,7 @@ RSpec.describe "bundle open" do
skip "No default gems available on this test run" if default_gems.empty?
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "json"
G
end
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb
index f9548238e9..14fe3e245b 100644
--- a/spec/bundler/commands/update_spec.rb
+++ b/spec/bundler/commands/update_spec.rb
@@ -66,7 +66,7 @@ RSpec.describe "bundle update" do
end
it "doesn't delete the Gemfile.lock file if something goes wrong" do
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
@@ -96,19 +96,19 @@ RSpec.describe "bundle update" do
before { bundle "config set update_requires_all_flag true" }
it "errors when passed nothing" do
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
bundle :update, :raise_on_error => false
expect(err).to eq("To update everything, pass the `--all` flag.")
end
it "errors when passed --all and another option" do
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
bundle "update --all foo", :raise_on_error => false
expect(err).to eq("Cannot specify --all along with specific options.")
end
it "updates everything when passed --all" do
- install_gemfile ""
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
bundle "update --all"
expect(out).to include("Bundle updated!")
end
@@ -753,6 +753,7 @@ RSpec.describe "bundle update in more complicated situations" do
build_git "foo"
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => '#{lib_path("foo-1.0")}'
G
@@ -769,6 +770,7 @@ RSpec.describe "bundle update in more complicated situations" do
build_git "rack"
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
gem "rack", :git => '#{lib_path("rack-1.0")}'
G
@@ -922,6 +924,7 @@ RSpec.describe "bundle update --ruby" do
::RUBY_VERSION = '2.1.3'
::RUBY_PATCHLEVEL = 100
ruby '~> 2.1.0'
+ source "#{file_uri_for(gem_repo1)}"
G
end
@@ -930,6 +933,7 @@ RSpec.describe "bundle update --ruby" do
gemfile <<-G
::RUBY_VERSION = '2.1.4'
::RUBY_PATCHLEVEL = 222
+ source "#{file_uri_for(gem_repo1)}"
G
end
it "removes the Ruby from the Gemfile.lock" do
@@ -937,6 +941,7 @@ RSpec.describe "bundle update --ruby" do
lockfile_should_be <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
PLATFORMS
@@ -956,6 +961,7 @@ RSpec.describe "bundle update --ruby" do
::RUBY_VERSION = '2.1.4'
::RUBY_PATCHLEVEL = 222
ruby '~> 2.1.0'
+ source "#{file_uri_for(gem_repo1)}"
G
end
it "updates the Gemfile.lock with the latest version" do
@@ -963,6 +969,7 @@ RSpec.describe "bundle update --ruby" do
lockfile_should_be <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
PLATFORMS
@@ -985,6 +992,7 @@ RSpec.describe "bundle update --ruby" do
::RUBY_VERSION = '2.2.2'
::RUBY_PATCHLEVEL = 505
ruby '~> 2.1.0'
+ source "#{file_uri_for(gem_repo1)}"
G
end
it "shows a helpful error message" do
@@ -1000,6 +1008,7 @@ RSpec.describe "bundle update --ruby" do
::RUBY_VERSION = '1.8.3'
::RUBY_PATCHLEVEL = 55
ruby '~> 1.8.0'
+ source "#{file_uri_for(gem_repo1)}"
G
end
it "updates the Gemfile.lock with the latest version" do
@@ -1007,6 +1016,7 @@ RSpec.describe "bundle update --ruby" do
lockfile_should_be <<-L
GEM
+ remote: #{file_uri_for(gem_repo1)}/
specs:
PLATFORMS
@@ -1248,7 +1258,7 @@ RSpec.describe "bundle update conservative" do
context "error handling" do
before do
- gemfile ""
+ gemfile "source \"#{file_uri_for(gem_repo1)}\""
end
it "raises if too many flags are provided" do