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

ruby-changes:62226

From: Utkarsh <ko1@a...>
Date: Wed, 15 Jul 2020 16:05:41 +0900 (JST)
Subject: [ruby-changes:62226] 4875a96edd (master): [rubygems/rubygems] Fix test to run rubocop on the generated gem

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

From 4875a96eddacc4c95f6b5d4129d919c7548b5082 Mon Sep 17 00:00:00 2001
From: Utkarsh Gupta <utkarsh@d...>
Date: Sun, 21 Jun 2020 01:52:11 +0530
Subject: [rubygems/rubygems] Fix test to run rubocop on the generated gem

With this, it will be ensured that the generated
(skeleton) gem will have no offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@d...>

https://github.com/rubygems/rubygems/commit/47411262e0

diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index f0f55ae..c45cc8d 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -177,12 +177,10 @@ RSpec.describe "bundle gem" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/newgem_spec.rb#L177
 
     it "run rubocop inside the generated gem with no offenses" do
       prepare_gemspec(bundled_app("#{gem_name}", "#{gem_name}.gemspec"))
-
-      gems = ["rubocop"]
+      gems = ["rake", "rubocop"]
       path = Bundler.feature_flag.default_install_uses_path? ? local_gem_path(:base => bundled_app("#{gem_name}")) : system_gem_path
       realworld_system_gems gems, :path => path
-      bundle "install", :dir => bundled_app("#{gem_name}")
-      bundle "exec rubocop", :dir => bundled_app("#{gem_name}")
+      bundle "exec rubocop --ignore-parent-exclusion", :dir => bundled_app("#{gem_name}")
       expect($?.exitstatus).to eq(0) if exitstatus
     end
   end
-- 
cgit v0.10.2


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

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