зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] WIP: add test to run rubocop on the generated gem
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/730b770f8a
This commit is contained in:
Родитель
cbe4d29c2d
Коммит
449d24200b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче