aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorMohit Natoo <mohitnatoo@gmail.com>2017-05-26 19:04:13 +0700
committerMohit Natoo <mohitnatoo@gmail.com>2017-05-26 19:25:53 +0700
commit4b04f56146f3f4e158d2d8ef6d88ef6495778df8 (patch)
tree20088e6c5b5cb3c60151d6094823a26e3daa4122 /activejob
parent673606a9623c50ec333f2e21c83d5a9236c6b70d (diff)
downloadrails-4b04f56146f3f4e158d2d8ef6d88ef6495778df8.tar.gz
rails-4b04f56146f3f4e158d2d8ef6d88ef6495778df8.tar.bz2
rails-4b04f56146f3f4e158d2d8ef6d88ef6495778df8.zip
Removed string inquiry.
fixed indentation. rebased with master.
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/queue_adapter.rb8
-rw-r--r--activejob/test/cases/queue_adapter_test.rb4
2 files changed, 6 insertions, 6 deletions
diff --git a/activejob/lib/active_job/queue_adapter.rb b/activejob/lib/active_job/queue_adapter.rb
index a97053a30b..b22d8b8347 100644
--- a/activejob/lib/active_job/queue_adapter.rb
+++ b/activejob/lib/active_job/queue_adapter.rb
@@ -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
diff --git a/activejob/test/cases/queue_adapter_test.rb b/activejob/test/cases/queue_adapter_test.rb
index 95ae6656d8..8368107bdf 100644
--- a/activejob/test/cases/queue_adapter_test.rb
+++ b/activejob/test/cases/queue_adapter_test.rb
@@ -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