summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/newgem_spec.rb
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarsh@debian.org>2020-06-21 01:52:11 +0530
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-15 16:05:12 +0900
commit4875a96eddacc4c95f6b5d4129d919c7548b5082 (patch)
tree0bdc386d56db6772a603768f220b21f12638e40e /spec/bundler/commands/newgem_spec.rb
parentb28c6d04d0989fa01842435f617e96420a8b4743 (diff)
[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@debian.org> https://github.com/rubygems/rubygems/commit/47411262e0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3275
Diffstat (limited to 'spec/bundler/commands/newgem_spec.rb')
-rw-r--r--spec/bundler/commands/newgem_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index f0f55ae2d5..c45cc8dfd4 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -177,12 +177,10 @@ RSpec.describe "bundle gem" do
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