diff options
Diffstat (limited to 'spec/bundler/install/gemfile/eval_gemfile_spec.rb')
-rw-r--r-- | spec/bundler/install/gemfile/eval_gemfile_spec.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb index 8303e6284e..cfa66e5986 100644 --- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb +++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb @@ -2,7 +2,7 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do before do - build_lib("gunks", :path => bundled_app.join("gems/gunks")) do |s| + build_lib("gunks", path: bundled_app.join("gems/gunks")) do |s| s.name = "gunks" s.version = "0.0.1" end @@ -11,18 +11,20 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do context "eval-ed Gemfile points to an internal gemspec" do before do create_file "Gemfile-other", <<-G + source "#{file_uri_for(gem_repo1)}" gemspec :path => 'gems/gunks' G end it "installs the gemspec specified gem" do install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile 'Gemfile-other' G expect(out).to include("Resolving dependencies") expect(out).to include("Bundle complete") - expect(the_bundle).to include_gem "gunks 0.0.1", :source => "path@#{bundled_app("gems", "gunks")}" + expect(the_bundle).to include_gem "gunks 0.0.1", source: "path@#{bundled_app("gems", "gunks")}" end end @@ -35,6 +37,8 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do end create_file bundled_app("gems/Gemfile"), <<-G + source "#{file_uri_for(gem_repo2)}" + gemspec :path => "\#{__dir__}/gunks" source "#{file_uri_for(gem_repo2)}" do @@ -60,12 +64,14 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do context "eval-ed Gemfile has relative-path gems" do before do - build_lib("a", :path => bundled_app("gems/a")) + build_lib("a", path: bundled_app("gems/a")) create_file bundled_app("nested/Gemfile-nested"), <<-G + source "#{file_uri_for(gem_repo1)}" gem "a", :path => "../gems/a" G gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile "nested/Gemfile-nested" G end @@ -89,13 +95,14 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do it "installs the gemspec specified gem" do install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" eval_gemfile 'other/Gemfile-other' gemspec :path => 'gems/gunks' G expect(out).to include("Resolving dependencies") expect(out).to include("Bundle complete") - expect(the_bundle).to include_gem "gunks 0.0.1", :source => "path@#{bundled_app("gems", "gunks")}" + expect(the_bundle).to include_gem "gunks 0.0.1", source: "path@#{bundled_app("gems", "gunks")}" end end |