summaryrefslogtreecommitdiff
path: root/spec/rubocop/cop/scalability/cron_worker_context_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubocop/cop/scalability/cron_worker_context_spec.rb')
-rw-r--r--spec/rubocop/cop/scalability/cron_worker_context_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb
index 4699e06e9cf..11b2b82d2f5 100644
--- a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb
+++ b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb
@@ -5,18 +5,15 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/scalability/cron_worker_context'
RSpec.describe RuboCop::Cop::Scalability::CronWorkerContext do
- include CopHelper
-
subject(:cop) { described_class.new }
it 'adds an offense when including CronjobQueue' do
- inspect_source(<<~CODE)
+ expect_offense(<<~CODE)
class SomeWorker
include CronjobQueue
+ ^^^^^^^^^^^^ Manually define an ApplicationContext for cronjob-workers.[...]
end
CODE
-
- expect(cop.offenses.size).to eq(1)
end
it 'does not add offenses for other workers' do