mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removed string inquiry.
fixed indentation. rebased with master.
This commit is contained in:
parent
673606a962
commit
4b04f56146
2 changed files with 6 additions and 6 deletions
|
@ -49,10 +49,10 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
def assign_adapter(adapter_name, queue_adapter)
|
||||
self._queue_adapter_name = ActiveSupport::StringInquirer.new(adapter_name)
|
||||
self._queue_adapter = queue_adapter
|
||||
end
|
||||
def assign_adapter(adapter_name, queue_adapter)
|
||||
self._queue_adapter_name = adapter_name
|
||||
self._queue_adapter = queue_adapter
|
||||
end
|
||||
|
||||
QUEUE_ADAPTER_METHODS = [:enqueue, :enqueue_at].freeze
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@ class QueueAdapterTest < ActiveJob::TestCase
|
|||
|
||||
child_job_one.queue_adapter = :stub_one
|
||||
|
||||
assert_not_equal ActiveJob::Base.queue_adapter, child_job_one.queue_adapter
|
||||
assert_equal "stub_one", child_job_one.queue_adapter_name
|
||||
assert child_job_one.queue_adapter_name.stub_one?
|
||||
assert_kind_of ActiveJob::QueueAdapters::StubOneAdapter, child_job_one.queue_adapter
|
||||
|
||||
child_job_two = Class.new(ActiveJob::Base)
|
||||
child_job_two.queue_adapter = :stub_two
|
||||
assert child_job_two.queue_adapter_name.stub_two?
|
||||
|
||||
assert_equal "stub_two", child_job_two.queue_adapter_name
|
||||
|
||||
assert_kind_of ActiveJob::QueueAdapters::StubTwoAdapter, child_job_two.queue_adapter
|
||||
|
|
Loading…
Reference in a new issue