diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-08 11:52:47 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-02-08 11:52:47 -0200 |
commit | de9a3748c436f849dd1877851115cd94663c2725 (patch) | |
tree | 8f3f46d9ef7483991920e11d7cb44454a644b614 /activejob | |
parent | f636ab75f15c2013373131f3d50e1aa26930b2cb (diff) | |
download | rails-de9a3748c436f849dd1877851115cd94663c2725.tar.gz rails-de9a3748c436f849dd1877851115cd94663c2725.tar.bz2 rails-de9a3748c436f849dd1877851115cd94663c2725.zip |
Move #18833 changelog to the top [ci skip]
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/CHANGELOG.md | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index 05ece5ddb2..d4e19274fa 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1,3 +1,36 @@ +* Add an `:only` option to `perform_enqueued_jobs` to filter jobs based on + 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. + + *Michael Ryan* + * Allow keyword arguments to be used with Active Job. Fixes #18741. @@ -44,39 +77,4 @@ *Isaac Seymour* -* Add an `:only` option to `perform_enqueued_jobs` to filter jobs based on - 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. - - *Michael Ryan* - - - Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/activejob/CHANGELOG.md) for previous changes. |