CHANGELOG.md 2.8 KB
Newer Older
1 2 3 4 5
*   Allow all assertion helpers that have a `only` and `except` keyword to accept
    Procs.

    *Edouard Chin*

6 7 8 9
*   Restore HashWithIndifferentAccess support to ActiveJob::Arguments.deserialize.

    *Gannon McGibbon*

10 11 12 13 14
*   Include deserialized arguments in job instances returned from
    `assert_enqueued_with` and `assert_performed_with`

    *Alan Wu*

15 16 17 18 19 20
*   Allow `assert_enqueued_with`/`assert_performed_with` methods to accept
    a proc for the `args` argument. This is useful to check if only a subset of arguments
    matches your expectations.

    *Edouard Chin*

21 22 23 24
*   `ActionDispatch::IntegrationTest` includes `ActiveJob::TestHelper` module by default.

    *Ricardo Díaz*

25 26 27 28
*   Added `enqueue_retry.active_job`, `retry_stopped.active_job`, and `discard.active_job` hooks.

    *steves*

29 30 31 32
*   Allow `assert_performed_with` to be called without a block.

    *bogdanvlviv*

33 34 35 36 37
*   Execution of `assert_performed_jobs`, and `assert_no_performed_jobs`
    without a block should respect passed `:except`, `:only`, and `:queue` options.

    *bogdanvlviv*

38 39 40 41
*   Allow `:queue` option to job assertions and helpers.

    *bogdanvlviv*

42 43 44 45 46 47
*   Allow `perform_enqueued_jobs` to be called without a block.

    Performs all of the jobs that have been enqueued up to this point in the test.

    *Kevin Deisz*

48 49 50 51
*   Move `enqueue`/`enqueue_at` notifications to an around callback.

    Improves timing accuracy over the old after callback by including
    time spent writing to the adapter's IO implementation.
52 53 54

    *Zach Kemp*

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
*   Allow call `assert_enqueued_with` with no block.

    Example:
    ```
    def test_assert_enqueued_with
      MyJob.perform_later(1,2,3)
      assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low')

      MyJob.set(wait_until: Date.tomorrow.noon).perform_later
      assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon)
    end
    ```

    *bogdanvlviv*

70 71 72 73
*   Allow passing multiple exceptions to `retry_on`, and `discard_on`.

    *George Claghorn*

74 75 76 77 78 79
*   Pass the error instance as the second parameter of block executed by `discard_on`.

    Fixes #32853.

    *Yuji Yaginuma*

A
Alberto Almagro 已提交
80 81 82 83 84 85 86 87
*   Remove support for Qu gem.

    Reasons are that the Qu gem wasn't compatible since Rails 5.1,
    gem development was stopped in 2014 and maintainers have
    confirmed its demise. See issue #32273

    *Alberto Almagro*

B
bogdanvlviv 已提交
88
*   Add support for timezones to Active Job.
89 90 91 92 93 94 95

    Record what was the current timezone in effect when the job was
    enqueued and then restore when the job is executed in same way
    that the current locale is recorded and restored.

    *Andrew White*

J
Jeremy Daer 已提交
96 97 98 99
*   Rails 6 requires Ruby 2.4.1 or newer.

    *Jeremy Daer*

R
Rafael Mendonça França 已提交
100 101 102
*   Add support to define custom argument serializers.

    *Evgenii Pecherkin*, *Rafael Mendonça França*
103 104


105
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activejob/CHANGELOG.md) for previous changes.