diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-11 17:36:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-11 17:36:43 -0400 |
commit | cfb1e4dfd8813d3d5c75a15a750b3c53eebdea65 (patch) | |
tree | 387edb2a4b1bdcdb5271d285c6fdf106313521a1 /activejob/test | |
parent | f3e8d599a3ce4bdc6cf38ccd2e78c14cb84e28c5 (diff) | |
parent | 2653765144976d8f085d3ac473926b3f97a71d6b (diff) | |
download | rails-cfb1e4dfd8813d3d5c75a15a750b3c53eebdea65.tar.gz rails-cfb1e4dfd8813d3d5c75a15a750b3c53eebdea65.tar.bz2 rails-cfb1e4dfd8813d3d5c75a15a750b3c53eebdea65.zip |
Merge pull request #29748 from koic/enable_layout_empty_line_after_magic_comment
Enable Layout/EmptyLineAfterMagicComment cop
Diffstat (limited to 'activejob/test')
65 files changed, 65 insertions, 0 deletions
diff --git a/activejob/test/adapters/async.rb b/activejob/test/adapters/async.rb index d5a61d7684..a4fed7c2f7 100644 --- a/activejob/test/adapters/async.rb +++ b/activejob/test/adapters/async.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + ActiveJob::Base.queue_adapter = :async ActiveJob::Base.queue_adapter.immediate = true diff --git a/activejob/test/adapters/backburner.rb b/activejob/test/adapters/backburner.rb index cfc97432f2..bc34c78e9c 100644 --- a/activejob/test/adapters/backburner.rb +++ b/activejob/test/adapters/backburner.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "support/backburner/inline" ActiveJob::Base.queue_adapter = :backburner diff --git a/activejob/test/adapters/delayed_job.rb b/activejob/test/adapters/delayed_job.rb index 3aa646555a..904b4c3f90 100644 --- a/activejob/test/adapters/delayed_job.rb +++ b/activejob/test/adapters/delayed_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + ActiveJob::Base.queue_adapter = :delayed_job $LOAD_PATH << File.expand_path("../support/delayed_job", __dir__) diff --git a/activejob/test/adapters/inline.rb b/activejob/test/adapters/inline.rb index ec3f0940e6..b1ddcb28f1 100644 --- a/activejob/test/adapters/inline.rb +++ b/activejob/test/adapters/inline.rb @@ -1,2 +1,3 @@ # frozen_string_literal: true + ActiveJob::Base.queue_adapter = :inline diff --git a/activejob/test/adapters/qu.rb b/activejob/test/adapters/qu.rb index f8e7eb624d..5b471fa347 100644 --- a/activejob/test/adapters/qu.rb +++ b/activejob/test/adapters/qu.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "qu-immediate" ActiveJob::Base.queue_adapter = :qu diff --git a/activejob/test/adapters/que.rb b/activejob/test/adapters/que.rb index 0d27bb8fc9..af77b0d4d1 100644 --- a/activejob/test/adapters/que.rb +++ b/activejob/test/adapters/que.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "support/que/inline" ActiveJob::Base.queue_adapter = :que diff --git a/activejob/test/adapters/queue_classic.rb b/activejob/test/adapters/queue_classic.rb index f57057c914..73902a5e62 100644 --- a/activejob/test/adapters/queue_classic.rb +++ b/activejob/test/adapters/queue_classic.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + require "support/queue_classic/inline" ActiveJob::Base.queue_adapter = :queue_classic diff --git a/activejob/test/adapters/resque.rb b/activejob/test/adapters/resque.rb index 6c732c1e33..ad84a49372 100644 --- a/activejob/test/adapters/resque.rb +++ b/activejob/test/adapters/resque.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + ActiveJob::Base.queue_adapter = :resque Resque.inline = true diff --git a/activejob/test/adapters/sidekiq.rb b/activejob/test/adapters/sidekiq.rb index 6cc64e7684..7df1c36488 100644 --- a/activejob/test/adapters/sidekiq.rb +++ b/activejob/test/adapters/sidekiq.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + require "sidekiq/testing/inline" ActiveJob::Base.queue_adapter = :sidekiq diff --git a/activejob/test/adapters/sneakers.rb b/activejob/test/adapters/sneakers.rb index 85f6b74144..38d82aa778 100644 --- a/activejob/test/adapters/sneakers.rb +++ b/activejob/test/adapters/sneakers.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + require "support/sneakers/inline" ActiveJob::Base.queue_adapter = :sneakers diff --git a/activejob/test/adapters/sucker_punch.rb b/activejob/test/adapters/sucker_punch.rb index 45b5fa1db2..04bad984d4 100644 --- a/activejob/test/adapters/sucker_punch.rb +++ b/activejob/test/adapters/sucker_punch.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + require "sucker_punch/testing/inline" ActiveJob::Base.queue_adapter = :sucker_punch diff --git a/activejob/test/adapters/test.rb b/activejob/test/adapters/test.rb index 965f7e91a2..0a1367dacf 100644 --- a/activejob/test/adapters/test.rb +++ b/activejob/test/adapters/test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + ActiveJob::Base.queue_adapter = :test ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true diff --git a/activejob/test/cases/adapter_test.rb b/activejob/test/cases/adapter_test.rb index 764ce3ccbc..2c179b2d38 100644 --- a/activejob/test/cases/adapter_test.rb +++ b/activejob/test/cases/adapter_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" class AdapterTest < ActiveSupport::TestCase diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb index ebd9a4fe41..13e6fcb727 100644 --- a/activejob/test/cases/argument_serialization_test.rb +++ b/activejob/test/cases/argument_serialization_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "active_job/arguments" require "models/person" diff --git a/activejob/test/cases/callbacks_test.rb b/activejob/test/cases/callbacks_test.rb index fbca367ae9..df6ce16858 100644 --- a/activejob/test/cases/callbacks_test.rb +++ b/activejob/test/cases/callbacks_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/callback_job" diff --git a/activejob/test/cases/exceptions_test.rb b/activejob/test/cases/exceptions_test.rb index 5f56d47e8e..7a3c372143 100644 --- a/activejob/test/cases/exceptions_test.rb +++ b/activejob/test/cases/exceptions_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/retry_job" diff --git a/activejob/test/cases/job_serialization_test.rb b/activejob/test/cases/job_serialization_test.rb index fa8d98ddca..440051c427 100644 --- a/activejob/test/cases/job_serialization_test.rb +++ b/activejob/test/cases/job_serialization_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/gid_job" require "jobs/hello_job" diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index 117d9b23a3..1f8c4a5573 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "active_support/log_subscriber/test_helper" require "active_support/core_ext/numeric/time" diff --git a/activejob/test/cases/queue_adapter_test.rb b/activejob/test/cases/queue_adapter_test.rb index 6061fb2127..e71cfa49cf 100644 --- a/activejob/test/cases/queue_adapter_test.rb +++ b/activejob/test/cases/queue_adapter_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" module ActiveJob diff --git a/activejob/test/cases/queue_naming_test.rb b/activejob/test/cases/queue_naming_test.rb index 8ba4324c46..b64a38f91e 100644 --- a/activejob/test/cases/queue_naming_test.rb +++ b/activejob/test/cases/queue_naming_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/hello_job" require "jobs/logging_job" diff --git a/activejob/test/cases/queue_priority_test.rb b/activejob/test/cases/queue_priority_test.rb index 416498c270..4b3006ae81 100644 --- a/activejob/test/cases/queue_priority_test.rb +++ b/activejob/test/cases/queue_priority_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/hello_job" diff --git a/activejob/test/cases/queuing_test.rb b/activejob/test/cases/queuing_test.rb index 44f674a2ee..0e843b7215 100644 --- a/activejob/test/cases/queuing_test.rb +++ b/activejob/test/cases/queuing_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/hello_job" require "active_support/core_ext/numeric/time" diff --git a/activejob/test/cases/rescue_test.rb b/activejob/test/cases/rescue_test.rb index c2a991cb2d..da9c87dbf0 100644 --- a/activejob/test/cases/rescue_test.rb +++ b/activejob/test/cases/rescue_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/rescue_job" require "models/person" diff --git a/activejob/test/cases/test_case_test.rb b/activejob/test/cases/test_case_test.rb index eb320a98d1..4ae2add3a8 100644 --- a/activejob/test/cases/test_case_test.rb +++ b/activejob/test/cases/test_case_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/hello_job" require "jobs/logging_job" diff --git a/activejob/test/cases/test_helper_test.rb b/activejob/test/cases/test_helper_test.rb index 0f8174663e..2e1d8cf81d 100644 --- a/activejob/test/cases/test_helper_test.rb +++ b/activejob/test/cases/test_helper_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "active_support/core_ext/time" require "active_support/core_ext/date" diff --git a/activejob/test/cases/translation_test.rb b/activejob/test/cases/translation_test.rb index d6782a38bd..6a0d6d3e54 100644 --- a/activejob/test/cases/translation_test.rb +++ b/activejob/test/cases/translation_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/translated_hello_job" diff --git a/activejob/test/helper.rb b/activejob/test/helper.rb index edcf159056..694232d7ef 100644 --- a/activejob/test/helper.rb +++ b/activejob/test/helper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "active_job" require "support/job_buffer" diff --git a/activejob/test/integration/queuing_test.rb b/activejob/test/integration/queuing_test.rb index 72c66d111f..0d8aa336a6 100644 --- a/activejob/test/integration/queuing_test.rb +++ b/activejob/test/integration/queuing_test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "helper" require "jobs/logging_job" require "jobs/hello_job" diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb index 32fe70b8e4..d92ffddcb5 100644 --- a/activejob/test/jobs/application_job.rb +++ b/activejob/test/jobs/application_job.rb @@ -1,3 +1,4 @@ # frozen_string_literal: true + class ApplicationJob < ActiveJob::Base end diff --git a/activejob/test/jobs/callback_job.rb b/activejob/test/jobs/callback_job.rb index 7c5b161437..436cb55492 100644 --- a/activejob/test/jobs/callback_job.rb +++ b/activejob/test/jobs/callback_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class CallbackJob < ActiveJob::Base before_perform ->(job) { job.history << "CallbackJob ran before_perform" } after_perform ->(job) { job.history << "CallbackJob ran after_perform" } diff --git a/activejob/test/jobs/gid_job.rb b/activejob/test/jobs/gid_job.rb index c43e25a796..2136f57e05 100644 --- a/activejob/test/jobs/gid_job.rb +++ b/activejob/test/jobs/gid_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class GidJob < ActiveJob::Base diff --git a/activejob/test/jobs/hello_job.rb b/activejob/test/jobs/hello_job.rb index 79e1d6a6f4..404df6150a 100644 --- a/activejob/test/jobs/hello_job.rb +++ b/activejob/test/jobs/hello_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class HelloJob < ActiveJob::Base diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb index 58b6582154..14f852ed06 100644 --- a/activejob/test/jobs/inherited_job.rb +++ b/activejob/test/jobs/inherited_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "application_job" class InheritedJob < ApplicationJob diff --git a/activejob/test/jobs/kwargs_job.rb b/activejob/test/jobs/kwargs_job.rb index ccd9811595..b86b06bada 100644 --- a/activejob/test/jobs/kwargs_job.rb +++ b/activejob/test/jobs/kwargs_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class KwargsJob < ActiveJob::Base diff --git a/activejob/test/jobs/logging_job.rb b/activejob/test/jobs/logging_job.rb index 1a47601fde..4605fa6937 100644 --- a/activejob/test/jobs/logging_job.rb +++ b/activejob/test/jobs/logging_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class LoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/nested_job.rb b/activejob/test/jobs/nested_job.rb index 891a2f952e..aafad0dba9 100644 --- a/activejob/test/jobs/nested_job.rb +++ b/activejob/test/jobs/nested_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class NestedJob < ActiveJob::Base def perform LoggingJob.perform_later "NestedJob" diff --git a/activejob/test/jobs/overridden_logging_job.rb b/activejob/test/jobs/overridden_logging_job.rb index 808d6e30e6..2ee363637d 100644 --- a/activejob/test/jobs/overridden_logging_job.rb +++ b/activejob/test/jobs/overridden_logging_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class OverriddenLoggingJob < ActiveJob::Base def perform(dummy) logger.info "Dummy, here is it: #{dummy}" diff --git a/activejob/test/jobs/provider_jid_job.rb b/activejob/test/jobs/provider_jid_job.rb index 71ed23e9bb..dacd09afdc 100644 --- a/activejob/test/jobs/provider_jid_job.rb +++ b/activejob/test/jobs/provider_jid_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class ProviderJidJob < ActiveJob::Base diff --git a/activejob/test/jobs/queue_adapter_job.rb b/activejob/test/jobs/queue_adapter_job.rb index 7058ab2087..1c31a60ba2 100644 --- a/activejob/test/jobs/queue_adapter_job.rb +++ b/activejob/test/jobs/queue_adapter_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class QueueAdapterJob < ActiveJob::Base self.queue_adapter = :inline end diff --git a/activejob/test/jobs/queue_as_job.rb b/activejob/test/jobs/queue_as_job.rb index ab3075aa77..0feee99e87 100644 --- a/activejob/test/jobs/queue_as_job.rb +++ b/activejob/test/jobs/queue_as_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class QueueAsJob < ActiveJob::Base diff --git a/activejob/test/jobs/rescue_job.rb b/activejob/test/jobs/rescue_job.rb index fd78820bfe..d142cec1ea 100644 --- a/activejob/test/jobs/rescue_job.rb +++ b/activejob/test/jobs/rescue_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class RescueJob < ActiveJob::Base diff --git a/activejob/test/jobs/retry_job.rb b/activejob/test/jobs/retry_job.rb index b121296441..a12d09779b 100644 --- a/activejob/test/jobs/retry_job.rb +++ b/activejob/test/jobs/retry_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" require "active_support/core_ext/integer/inflections" diff --git a/activejob/test/jobs/translated_hello_job.rb b/activejob/test/jobs/translated_hello_job.rb index 67ddca2f41..a0a68b4040 100644 --- a/activejob/test/jobs/translated_hello_job.rb +++ b/activejob/test/jobs/translated_hello_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require_relative "../support/job_buffer" class TranslatedHelloJob < ActiveJob::Base diff --git a/activejob/test/models/person.rb b/activejob/test/models/person.rb index bcd1018782..9a3bfab25f 100644 --- a/activejob/test/models/person.rb +++ b/activejob/test/models/person.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class Person class RecordNotFound < StandardError; end diff --git a/activejob/test/support/backburner/inline.rb b/activejob/test/support/backburner/inline.rb index 304f9c781c..6c708c0b7b 100644 --- a/activejob/test/support/backburner/inline.rb +++ b/activejob/test/support/backburner/inline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "backburner" Backburner::Worker.class_eval do diff --git a/activejob/test/support/delayed_job/delayed/backend/test.rb b/activejob/test/support/delayed_job/delayed/backend/test.rb index ed3b252042..4721c1cc17 100644 --- a/activejob/test/support/delayed_job/delayed/backend/test.rb +++ b/activejob/test/support/delayed_job/delayed/backend/test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + #copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb require "ostruct" diff --git a/activejob/test/support/integration/adapters/async.rb b/activejob/test/support/integration/adapters/async.rb index 19aea8472e..ba9674d7a1 100644 --- a/activejob/test/support/integration/adapters/async.rb +++ b/activejob/test/support/integration/adapters/async.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module AsyncJobsManager def setup ActiveJob::Base.queue_adapter = :async diff --git a/activejob/test/support/integration/adapters/backburner.rb b/activejob/test/support/integration/adapters/backburner.rb index fd1e7697c5..eb179011d9 100644 --- a/activejob/test/support/integration/adapters/backburner.rb +++ b/activejob/test/support/integration/adapters/backburner.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module BackburnerJobsManager def setup ActiveJob::Base.queue_adapter = :backburner diff --git a/activejob/test/support/integration/adapters/delayed_job.rb b/activejob/test/support/integration/adapters/delayed_job.rb index 73e1a04e45..ae5de78b60 100644 --- a/activejob/test/support/integration/adapters/delayed_job.rb +++ b/activejob/test/support/integration/adapters/delayed_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "delayed_job" require "delayed_job_active_record" diff --git a/activejob/test/support/integration/adapters/inline.rb b/activejob/test/support/integration/adapters/inline.rb index c669793dba..10a97fb941 100644 --- a/activejob/test/support/integration/adapters/inline.rb +++ b/activejob/test/support/integration/adapters/inline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module InlineJobsManager def setup ActiveJob::Base.queue_adapter = :inline diff --git a/activejob/test/support/integration/adapters/qu.rb b/activejob/test/support/integration/adapters/qu.rb index b2f63d8f94..67db03e279 100644 --- a/activejob/test/support/integration/adapters/qu.rb +++ b/activejob/test/support/integration/adapters/qu.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module QuJobsManager def setup require "qu-rails" diff --git a/activejob/test/support/integration/adapters/que.rb b/activejob/test/support/integration/adapters/que.rb index cf1160d2bc..2a771b08c7 100644 --- a/activejob/test/support/integration/adapters/que.rb +++ b/activejob/test/support/integration/adapters/que.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module QueJobsManager def setup require "sequel" diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb index 7f1308c5d3..1b0685a971 100644 --- a/activejob/test/support/integration/adapters/queue_classic.rb +++ b/activejob/test/support/integration/adapters/queue_classic.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module QueueClassicJobsManager def setup ENV["QC_DATABASE_URL"] ||= "postgres:///active_jobs_qc_int_test" diff --git a/activejob/test/support/integration/adapters/resque.rb b/activejob/test/support/integration/adapters/resque.rb index 5d142d324d..484b476567 100644 --- a/activejob/test/support/integration/adapters/resque.rb +++ b/activejob/test/support/integration/adapters/resque.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module ResqueJobsManager def setup ActiveJob::Base.queue_adapter = :resque diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index 253cbd550b..b63d16d248 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "sidekiq/api" require "sidekiq/testing" diff --git a/activejob/test/support/integration/adapters/sneakers.rb b/activejob/test/support/integration/adapters/sneakers.rb index dc42501ff3..965e6e2e6c 100644 --- a/activejob/test/support/integration/adapters/sneakers.rb +++ b/activejob/test/support/integration/adapters/sneakers.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "sneakers/runner" require "sneakers/publisher" require "timeout" diff --git a/activejob/test/support/integration/adapters/sucker_punch.rb b/activejob/test/support/integration/adapters/sucker_punch.rb index e528f24261..099d412c8f 100644 --- a/activejob/test/support/integration/adapters/sucker_punch.rb +++ b/activejob/test/support/integration/adapters/sucker_punch.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module SuckerPunchJobsManager def setup ActiveJob::Base.queue_adapter = :sucker_punch diff --git a/activejob/test/support/integration/dummy_app_template.rb b/activejob/test/support/integration/dummy_app_template.rb index a054ecea08..ac382bd1b7 100644 --- a/activejob/test/support/integration/dummy_app_template.rb +++ b/activejob/test/support/integration/dummy_app_template.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + if ENV["AJ_ADAPTER"] == "delayed_job" generate "delayed_job:active_record", "--quiet" end diff --git a/activejob/test/support/integration/helper.rb b/activejob/test/support/integration/helper.rb index c0aa14c4c2..a058da141f 100644 --- a/activejob/test/support/integration/helper.rb +++ b/activejob/test/support/integration/helper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + puts "\n\n*** rake aj:integration:#{ENV['AJ_ADAPTER']} ***\n" ENV["RAILS_ENV"] = "test" diff --git a/activejob/test/support/integration/jobs_manager.rb b/activejob/test/support/integration/jobs_manager.rb index 1cfbd60dc4..4775f52b2f 100644 --- a/activejob/test/support/integration/jobs_manager.rb +++ b/activejob/test/support/integration/jobs_manager.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + class JobsManager @@managers = {} attr :adapter_name diff --git a/activejob/test/support/integration/test_case_helpers.rb b/activejob/test/support/integration/test_case_helpers.rb index add719187c..9629876a6d 100644 --- a/activejob/test/support/integration/test_case_helpers.rb +++ b/activejob/test/support/integration/test_case_helpers.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "active_support/core_ext/string/inflections" require "support/integration/jobs_manager" diff --git a/activejob/test/support/job_buffer.rb b/activejob/test/support/job_buffer.rb index 3146d06d54..45a6437685 100644 --- a/activejob/test/support/job_buffer.rb +++ b/activejob/test/support/job_buffer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module JobBuffer class << self def clear diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb index e204f8154a..4ca65c1cd4 100644 --- a/activejob/test/support/que/inline.rb +++ b/activejob/test/support/que/inline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "que" Que::Job.class_eval do diff --git a/activejob/test/support/queue_classic/inline.rb b/activejob/test/support/queue_classic/inline.rb index 955469e5a8..ca3cd4581b 100644 --- a/activejob/test/support/queue_classic/inline.rb +++ b/activejob/test/support/queue_classic/inline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "queue_classic" module QC diff --git a/activejob/test/support/sneakers/inline.rb b/activejob/test/support/sneakers/inline.rb index 46882870d5..92b69ee3bc 100644 --- a/activejob/test/support/sneakers/inline.rb +++ b/activejob/test/support/sneakers/inline.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "sneakers" module Sneakers |