1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Documentation clarity in ActiveJob::TestHelper [ci skip] (#33571)

* Documentation clarity in ActiveJob::TestHelper [ci skip]

* Documentation for options

[Mohit Natoo + Rafael Mendonça França]
This commit is contained in:
Mohit Natoo 2018-09-28 21:40:26 +05:30 committed by Rafael França
parent 7d3f1c414f
commit 9fa4342970

View file

@ -75,7 +75,7 @@ module ActiveJob
# assert_enqueued_jobs 2
# end
#
# If a block is passed, that block will cause the specified number of
# If a block is passed, asserts that the block will cause the specified number of
# jobs to be enqueued.
#
# def test_jobs_again
@ -89,7 +89,7 @@ module ActiveJob
# end
# end
#
# The number of times a specific job was enqueued can be asserted.
# Asserts the number of times a specific job was enqueued by passing +:only+ option.
#
# def test_logging_job
# assert_enqueued_jobs 1, only: LoggingJob do
@ -98,7 +98,7 @@ module ActiveJob
# end
# end
#
# The number of times a job except specific class was enqueued can be asserted.
# Asserts the number of times a job except specific class was enqueued by passing +:except+ option.
#
# def test_logging_job
# assert_enqueued_jobs 1, except: HelloJob do
@ -107,7 +107,7 @@ module ActiveJob
# end
# end
#
# The number of times a job is enqueued to a specific queue can also be asserted.
# Asserts the number of times a job is enqueued to a specific queue by passing +:queue+ option.
#
# def test_logging_job
# assert_enqueued_jobs 2, queue: 'default' do
@ -139,7 +139,7 @@ module ActiveJob
# assert_enqueued_jobs 1
# end
#
# If a block is passed, that block should not cause any job to be enqueued.
# If a block is passed, asserts that the block will not cause any job to be enqueued.
#
# def test_jobs_again
# assert_no_enqueued_jobs do
@ -147,7 +147,7 @@ module ActiveJob
# end
# end
#
# It can be asserted that no jobs of a specific kind are enqueued:
# Asserts that no jobs of a specific kind are enqueued by passing +:only+ option.
#
# def test_no_logging
# assert_no_enqueued_jobs only: LoggingJob do
@ -155,7 +155,7 @@ module ActiveJob
# end
# end
#
# It can be asserted that no jobs except specific class are enqueued:
# Asserts that no jobs except specific class are enqueued by passing +:except+ option.
#
# def test_no_logging
# assert_no_enqueued_jobs except: HelloJob do
@ -163,7 +163,7 @@ module ActiveJob
# end
# end
#
# It can be asserted that no jobs are enqueued to a specific queue:
# Asserts that no jobs are enqueued to a specific queue by passing +:queue+ option
#
# def test_no_logging
# assert_no_enqueued_jobs queue: 'default' do