diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/rubocop/cop/scalability/idempotent_worker_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/rubocop/cop/scalability/idempotent_worker_spec.rb')
-rw-r--r-- | spec/rubocop/cop/scalability/idempotent_worker_spec.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb index 666122a9de4..729f2613697 100644 --- a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb +++ b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb @@ -5,8 +5,6 @@ require 'rubocop' require_relative '../../../../rubocop/cop/scalability/idempotent_worker' RSpec.describe RuboCop::Cop::Scalability::IdempotentWorker do - include CopHelper - subject(:cop) { described_class.new } before do @@ -16,21 +14,18 @@ RSpec.describe RuboCop::Cop::Scalability::IdempotentWorker do end it 'adds an offense when not defining idempotent method' do - inspect_source(<<~CODE) + expect_offense(<<~CODE) class SomeWorker + ^^^^^^^^^^^^^^^^ Avoid adding not idempotent workers.[...] end CODE - - expect(cop.offenses.size).to eq(1) end it 'adds an offense when not defining idempotent method' do - inspect_source(<<~CODE) + expect_no_offenses(<<~CODE) class SomeWorker idempotent! end CODE - - expect(cop.offenses.size).to be_zero end end |