diff options
Diffstat (limited to 'spec/bundler/plugins/source_spec.rb')
| -rw-r--r-- | spec/bundler/plugins/source_spec.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/bundler/plugins/source_spec.rb b/spec/bundler/plugins/source_spec.rb index 543e90eb60..995e50e653 100644 --- a/spec/bundler/plugins/source_spec.rb +++ b/spec/bundler/plugins/source_spec.rb @@ -16,11 +16,12 @@ RSpec.describe "bundler source plugin" do it "installs bundler-source-* gem when no handler for source is present" do install_gemfile <<-G - source "file://#{gem_repo2}" - source "file://#{lib_path("gitp")}", :type => :psource do + source "https://gem.repo2" + source "#{lib_path("gitp")}", :type => :psource do end G + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) plugin_should_be_installed("bundler-source-psource") end @@ -37,8 +38,8 @@ RSpec.describe "bundler source plugin" do end install_gemfile <<-G - source "file://#{gem_repo2}" - source "file://#{lib_path("gitp")}", :type => :psource do + source "https://gem.repo2" + source "#{lib_path("gitp")}", :type => :psource do end G @@ -61,11 +62,11 @@ RSpec.describe "bundler source plugin" do context "explicit presence in gemfile" do before do install_gemfile <<-G - source "file://#{gem_repo2}" + source "https://gem.repo2" plugin "another-psource" - source "file://#{lib_path("gitp")}", :type => :psource do + source "#{lib_path("gitp")}", :type => :psource do end G end @@ -75,6 +76,7 @@ RSpec.describe "bundler source plugin" do end it "installs the explicit one" do + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) plugin_should_be_installed("another-psource") end @@ -86,11 +88,11 @@ RSpec.describe "bundler source plugin" do context "explicit default source" do before do install_gemfile <<-G - source "file://#{gem_repo2}" + source "https://gem.repo2" plugin "bundler-source-psource" - source "file://#{lib_path("gitp")}", :type => :psource do + source "#{lib_path("gitp")}", :type => :psource do end G end @@ -100,6 +102,7 @@ RSpec.describe "bundler source plugin" do end it "installs the default one" do + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) plugin_should_be_installed("bundler-source-psource") end end |
