aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/queue_adapter.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-30 21:05:29 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-30 21:05:29 -0300
commit0d1ab3491522a6b757e864412c84406764f10b9d (patch)
tree636632992460e0c29c882f11b8fb39d87a9c93f6 /activejob/lib/active_job/queue_adapter.rb
parent04852b875ec5c2bd5e5f8bf525b7be60682d0c27 (diff)
parent8a73f4b5b9d342a45b3c8e29a13142adbca9ab21 (diff)
downloadrails-0d1ab3491522a6b757e864412c84406764f10b9d.tar.gz
rails-0d1ab3491522a6b757e864412c84406764f10b9d.tar.bz2
rails-0d1ab3491522a6b757e864412c84406764f10b9d.zip
Merge pull request #18266 from cristianbica/ajfixes
ActiveJob testing improvements
Diffstat (limited to 'activejob/lib/active_job/queue_adapter.rb')
-rw-r--r--activejob/lib/active_job/queue_adapter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activejob/lib/active_job/queue_adapter.rb b/activejob/lib/active_job/queue_adapter.rb
index 85d7c44bb8..d48d56e1da 100644
--- a/activejob/lib/active_job/queue_adapter.rb
+++ b/activejob/lib/active_job/queue_adapter.rb
@@ -2,7 +2,7 @@ require 'active_job/queue_adapters/inline_adapter'
require 'active_support/core_ext/string/inflections'
module ActiveJob
- # The <tt>ActionJob::QueueAdapter</tt> module is used to load the
+ # The <tt>ActionJob::QueueAdapter</tt> module is used to load the
# correct adapter. The default queue adapter is the :inline queue.
module QueueAdapter #:nodoc:
extend ActiveSupport::Concern
@@ -21,8 +21,8 @@ module ActiveJob
ActiveJob::QueueAdapters::TestAdapter.new
when Symbol, String
load_adapter(name_or_adapter)
- when Class
- name_or_adapter
+ else
+ name_or_adapter if name_or_adapter.respond_to?(:enqueue)
end
end