aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/queue_adapters/test_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
* `ActiveJob::QueueAdapters::*` are no longer singletonsTamir Duberstein2015-03-111-35/+33
|
* Avoid creating an extra hash on the job test adapterCarlos Antonio da Silva2015-02-241-1/+1
|
* `ActiveJob::QueueAdapters::TestAdapter` is now a singletonTamir Duberstein2015-02-231-26/+26
| | | | | | | | | 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.
* Add an `:only` option to `perform_enqueued_jobs` to filter jobs based onMichael Ryan2015-02-061-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type. This allows specific jobs to be tested, while preventing others from being performed unnecessarily. Example: def test_hello_job assert_performed_jobs 1, only: HelloJob do HelloJob.perform_later('jeremy') LoggingJob.perform_later end end An array may also be specified, to support testing multiple jobs. Example: def test_hello_and_logging_jobs assert_nothing_raised do assert_performed_jobs 2, only: [HelloJob, LoggingJob] do HelloJob.perform_later('jeremy') LoggingJob.perform_later('stewie') RescueJob.perform_later('david') end end end Fixes #18802. Trim space and document :only option.
* ActiveJob testing improvementsCristian Bica2014-12-301-6/+11
| | | | | | | | 1. The :test adapter wasn't going through a full cycle of serialize/deserialize when performing jobs. Now it does 2. Regular AJ tests were not run for the :test adapter. Now they are 3. ActiveJob::TestHelper uses assert_valid_keys but doesn’t requires the file that implements that method. Now it does
* Added RDoc for each Active Job adapterCristian Bica2014-09-221-2/+11
|
* simplify test_adapterAbdelkader Boudih2014-09-141-43/+4
|
* Active Job refactoringCristian Bica2014-09-031-8/+8
|
* Fix failing tests in ActiveJob AdapterAbdelkader Boudih2014-09-021-0/+1
|
* [ActiveJob] TestCase (Will squash before merge)Abdelkader Boudih2014-09-021-12/+12
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-60/+58
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-0/+77