Skip to content

Commit

Permalink
Merge pull request #9422 from koic/tweak_new_cop_template
Browse files Browse the repository at this point in the history
Tweak new cop template
  • Loading branch information
koic authored Jan 27, 2021
2 parents 7be96b3 + 62c9e3f commit 6d6708d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/rubocop/cop/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ def on_send(node)
SPEC_TEMPLATE = <<~SPEC
# frozen_string_literal: true
RSpec.describe RuboCop::Cop::%<department>s::%<cop_name>s do
subject(:cop) { described_class.new(config) }
RSpec.describe RuboCop::Cop::%<department>s::%<cop_name>s, :config do
let(:config) { RuboCop::Config.new }
# TODO: Write test code
Expand Down
4 changes: 1 addition & 3 deletions spec/rubocop/cop/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ def on_send(node)
generated_source = <<~SPEC
# frozen_string_literal: true
RSpec.describe RuboCop::Cop::Style::FakeCop do
subject(:cop) { described_class.new(config) }
RSpec.describe RuboCop::Cop::Style::FakeCop, :config do
let(:config) { RuboCop::Config.new }
# TODO: Write test code
Expand Down

0 comments on commit 6d6708d

Please sign in to comment.