summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler
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/bundler
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/bundler')
-rw-r--r--spec/bundler/bundler/cli_spec.rb6
-rw-r--r--spec/bundler/bundler/env_spec.rb4
-rw-r--r--spec/bundler/bundler/plugin/index_spec.rb2
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index cc8949d27d..c9dd101f55 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -129,18 +129,18 @@ RSpec.describe "bundle executable" do
context "with --verbose" do
it "prints the running command" do
- gemfile ""
+ gemfile "source \"#{file_uri_for(gem_repo1)}\""
bundle "info bundler", :verbose => true
expect(out).to start_with("Running `bundle info bundler --verbose` with bundler #{Bundler::VERSION}")
end
it "doesn't print defaults" do
- install_gemfile "", :verbose => true
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"", :verbose => true
expect(out).to start_with("Running `bundle install --verbose` with bundler #{Bundler::VERSION}")
end
it "doesn't print defaults" do
- install_gemfile "", :verbose => true
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\"", :verbose => true
expect(out).to start_with("Running `bundle install --verbose` with bundler #{Bundler::VERSION}")
end
end
diff --git a/spec/bundler/bundler/env_spec.rb b/spec/bundler/bundler/env_spec.rb
index 0dc19d1cf8..5d3aeec226 100644
--- a/spec/bundler/bundler/env_spec.rb
+++ b/spec/bundler/bundler/env_spec.rb
@@ -74,7 +74,7 @@ RSpec.describe Bundler::Env do
context "when there is a Gemfile and a lockfile and print_gemfile is true" do
before do
- gemfile "gem 'rack', '1.0.0'"
+ gemfile "source \"#{file_uri_for(gem_repo1)}\"; gem 'rack', '1.0.0'"
lockfile <<-L
GEM
@@ -138,7 +138,7 @@ RSpec.describe Bundler::Env do
end
before do
- gemfile("gemspec")
+ gemfile("source \"#{file_uri_for(gem_repo1)}\"; gemspec")
File.open(bundled_app.join("foo.gemspec"), "wb") do |f|
f.write(gemspec)
diff --git a/spec/bundler/bundler/plugin/index_spec.rb b/spec/bundler/bundler/plugin/index_spec.rb
index bf32c3e2ba..d34b0de342 100644
--- a/spec/bundler/bundler/plugin/index_spec.rb
+++ b/spec/bundler/bundler/plugin/index_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Bundler::Plugin::Index do
before do
allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
- gemfile ""
+ gemfile "source \"#{file_uri_for(gem_repo1)}\""
path = lib_path(plugin_name)
index.register_plugin("new-plugin", path.to_s, [path.join("lib").to_s], commands, sources, hooks)
end