[前][次][番号順一覧][スレッド一覧]

ruby-changes:57780

From: David <ko1@a...>
Date: Wed, 18 Sep 2019 18:51:40 +0900 (JST)
Subject: [ruby-changes:57780] effacde2c0 (master): [bundler/bundler] Merge all `bundle check --path` specs

https://git.ruby-lang.org/ruby.git/commit/?id=effacde2c0

From effacde2c0104935fd7258eac77f17684f724cd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 16 Aug 2019 14:30:39 +0200
Subject: [bundler/bundler] Merge all `bundle check --path` specs

And skip them all for bundler 3.

https://github.com/bundler/bundler/commit/b88936cdc2

diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb
index 959b433..c755ef2 100644
--- a/spec/bundler/commands/check_spec.rb
+++ b/spec/bundler/commands/check_spec.rb
@@ -239,37 +239,42 @@ RSpec.describe "bundle check" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/check_spec.rb#L239
   end
 
   context "--path", :bundler => "< 3" do
-    before do
-      gemfile <<-G
-        source "#{file_uri_for(gem_repo1)}"
-        gem "rails"
-      G
-      bundle "install --path vendor/bundle"
+    context "after installing gems in the proper directory" do
+      before do
+        gemfile <<-G
+          source "#{file_uri_for(gem_repo1)}"
+          gem "rails"
+        G
+        bundle "install --path vendor/bundle"
+
+        FileUtils.rm_rf(bundled_app(".bundle"))
+      end
 
-      FileUtils.rm_rf(bundled_app(".bundle"))
-    end
+      it "returns success" do
+        bundle! "check --path vendor/bundle"
+        expect(out).to include("The Gemfile's dependencies are satisfied")
+      end
 
-    it "returns success" do
-      bundle! "check --path vendor/bundle"
-      expect(out).to include("The Gemfile's dependencies are satisfied")
+      it "should write to .bundle/config" do
+        bundle "check --path vendor/bundle"
+        bundle! "check"
+      end
     end
 
-    it "should write to .bundle/config" do
-      bundle "check --path vendor/bundle"
-      bundle! "check"
-    end
-  end
+    context "after installing gems on a different directory" do
+      before do
+        install_gemfile <<-G
+          source "#{file_uri_for(gem_repo1)}"
+          gem "rails"
+        G
 
-  context "--path vendor/bundle after installing gems in the default directory" do
-    it "returns false" do
-      install_gemfile <<-G
-        source "#{file_uri_for(gem_repo1)}"
-        gem "rails"
-      G
+        bundle "check --path vendor/bundle"
+      end
 
-      bundle "check --path vendor/bundle"
-      expect(exitstatus).to eq(1) if exitstatus
-      expect(err).to match(/The following gems are missing/)
+      it "returns false" do
+        expect(exitstatus).to eq(1) if exitstatus
+        expect(err).to match(/The following gems are missing/)
+      end
     end
   end
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]