diff options
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/commands/newgem_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index b3dc511f58..91e33bd2b9 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -173,6 +173,18 @@ RSpec.describe "bundle gem" do it "generates a default .rubocop.yml" do expect(bundled_app("#{gem_name}/.rubocop.yml")).to exist end + + it "run rubocop inside the generated gem with no offenses" do + prepare_gemspec(bundled_app("#{gem_name}", "#{gem_name}.gemspec")) + + gems = ["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}") + + expect($?.exitstatus).to eq(0) if exitstatus + end end shared_examples_for "--no-rubocop flag" do |