aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-09-05 09:13:24 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-09-05 09:21:10 +0900
commit0b2197774ccca2a15b01212053143114ee058038 (patch)
tree80ea0c30741ab76907ab840232fe16aa79e3c504 /activejob/test/jobs
parent55c5dffd9f2220507ff1a7635c00a81577a8a391 (diff)
downloadrails-0b2197774ccca2a15b01212053143114ee058038.tar.gz
rails-0b2197774ccca2a15b01212053143114ee058038.tar.bz2
rails-0b2197774ccca2a15b01212053143114ee058038.zip
use `descendants` to get class that inherited `ActiveJob::Base`
`subclasses` get only child classes. Therefore, if create a job common parent class as `ApplicationJob`, inherited class does not get properly.
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/application_job.rb4
-rw-r--r--activejob/test/jobs/inherited_job.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb
new file mode 100644
index 0000000000..4a78b890ec
--- /dev/null
+++ b/activejob/test/jobs/application_job.rb
@@ -0,0 +1,4 @@
+require_relative "../support/job_buffer"
+
+class ApplicationJob < ActiveJob::Base
+end
diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb
new file mode 100644
index 0000000000..60fca66f88
--- /dev/null
+++ b/activejob/test/jobs/inherited_job.rb
@@ -0,0 +1,5 @@
+require_relative "application_job"
+
+class InheritedJob < ApplicationJob
+ self.queue_adapter = :inline
+end