test/plugins/job/logger_test.rb in rocketjob-3.4.3 vs test/plugins/job/logger_test.rb in rocketjob-3.5.0

- old
+ new

@@ -2,11 +2,10 @@ # Unit Test for RocketJob::Job module Plugins module Job class LoggerTest < Minitest::Test - class LoggerJob < RocketJob::Job def perform logger.debug('DONE', value: 123, other_value: 'HI') end end @@ -34,25 +33,24 @@ end it 'adds start logging' do @job = LoggerJob.new info_called = false - @job.logger.stub(:info, -> description { info_called = true if description == 'Start #perform' }) do + @job.logger.stub(:info, ->(description) { info_called = true if description == 'Start #perform' }) do @job.perform_now end assert info_called, "In Plugins::Job::Logger.around_perform logger.info('Start #perform') not called" end it 'adds completed logging' do @job = LoggerJob.new measure_called = false - @job.logger.stub(:measure_info, -> description, *args { measure_called = true if description == 'Completed #perform' }) do + @job.logger.stub(:measure_info, ->(description, *_args) { measure_called = true if description == 'Completed #perform' }) do @job.perform_now end assert measure_called, "In Plugins::Job::Logger.around_perform logger.measure_info('Completed #perform') not called" end end - end end end end