Sha256: c30f8115c267767cab3509ebf46f826cf1e894d01ca99f7b52d2b014f37d2c6a

Contents?: true

Size: 1002 Bytes

Versions: 9

Compression:

Stored size: 1002 Bytes

Contents

# Smoke testing for this gem

require 'tmpdir'
require 'pathname'

exe_path = File.expand_path('../exe/rubocop-extension-generator', __dir__)
load_path = File.expand_path('../lib', __dir__)

Dir.mktmpdir('-rubocop-extension-generator-smoke') do |base_dir|
  base_dir = Pathname(base_dir)
  gem_name = 'rubocop-smoke'
  gem_dir = base_dir / gem_name

  system({ 'RUBYLIB' => load_path }, 'ruby', exe_path, gem_name, exception: true, chdir: base_dir)

  gemspec_path = gem_dir / "#{gem_name}.gemspec"
  gemspec = gemspec_path.read
  gemspec[/spec\.summary.+/] = 'spec.summary = "a gem for smoke testing"'
  gemspec.gsub!(/^.+spec\.description.+$/, '')
  gemspec.gsub!(/^.+spec\.homepage.+$/, '')
  gemspec.gsub!(/^.+spec\.metadata.+$/, '')

  gemspec_path.write gemspec

  system('bundle', 'install', exception: true, chdir: gem_dir)
  system('bundle', 'exec', 'rake', 'new_cop[Smoke/Foo]', exception: true, chdir: gem_dir)
  system('bundle', 'exec', 'rake', 'spec', exception: true, chdir: gem_dir)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubocop-extension-generator-0.5.2 smoke/smoke.rb
rubocop-extension-generator-0.5.1 smoke/smoke.rb
rubocop-extension-generator-0.5.0 smoke/smoke.rb
rubocop-extension-generator-0.4.0 smoke/smoke.rb
rubocop-extension-generator-0.3.0 smoke/smoke.rb
rubocop-extension-generator-0.2.3 smoke/smoke.rb
rubocop-extension-generator-0.2.2 smoke/smoke.rb
rubocop-extension-generator-0.2.1 smoke/smoke.rb
rubocop-extension-generator-0.2.0 smoke/smoke.rb