diff options
Diffstat (limited to 'spec/bundler/commands/update_spec.rb')
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 20 |
1 files changed, 15 insertions, 5 deletions
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 |