diff options
author | Tamir Duberstein <tamird@squareup.com> | 2014-09-23 21:11:54 -0700 |
---|---|---|
committer | Tamir Duberstein <tamird@squareup.com> | 2015-02-23 17:31:36 -0800 |
commit | 802f855ecf95d36982482182adcb007d505e2178 (patch) | |
tree | a4da9e398d586de86d24cd22997652336ebacb82 /activejob/test | |
parent | 88b334ec696ffe1fa08b934780f4ab27030c5c76 (diff) | |
download | rails-802f855ecf95d36982482182adcb007d505e2178.tar.gz rails-802f855ecf95d36982482182adcb007d505e2178.tar.bz2 rails-802f855ecf95d36982482182adcb007d505e2178.zip |
`ActiveJob::QueueAdapters::TestAdapter` is now a singleton
Since `ActiveJob::TestHelper` globally sets
`ActiveJob::Base.queue_adapter` on setup, there is no benefit in
instantiating a new `TestAdapter` per tests. The original rationale was
to allow parallel tests to run without interference, but since they'd
all mutate the global `ActiveJob::Base.queue_adapter`, that was never
realized.
Diffstat (limited to 'activejob/test')
-rw-r--r-- | activejob/test/cases/test_case_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/test/cases/test_case_test.rb b/activejob/test/cases/test_case_test.rb index 1d0fdbd22d..7d1702990e 100644 --- a/activejob/test/cases/test_case_test.rb +++ b/activejob/test/cases/test_case_test.rb @@ -9,6 +9,6 @@ class ActiveJobTestCaseTest < ActiveJob::TestCase end def test_set_test_adapter - assert_instance_of ActiveJob::QueueAdapters::TestAdapter, self.queue_adapter + assert_equal ActiveJob::QueueAdapters::TestAdapter, self.queue_adapter end end |