aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/cases/test_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add an `:only` option to `perform_enqueued_jobs` to filter jobs based onMichael Ryan2015-02-061-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix ActiveJob assertions with a GlobalID object argumentRichard Manyanza2015-01-231-0/+39
|
* Add :only option to assert_no_enqueued_jobsGeorge Claghorn2015-01-081-0/+19
|
* Add :only option to assert_enqueued_jobsGeorge Claghorn2015-01-071-0/+40
| | | | With the option, assert_enqueued_jobs will check the number of times a specific kind of job is enqueued.
* Add perform_enqueued_jobsFábio Luiz Nery de Miranda2014-11-251-13/+23
| | | | | | | | | It will set proper queue_adapter state required by assert_performed_jobs assertions. Also the block version of assert_performed_jobs will make sure this state is respected. Fixes #17684
* Merge pull request #17005 from y-yagi/fix_aj_test_helperYves Senn2014-09-231-1/+3
|\ | | | | | | add message to `assert` in `assert_enqueued_with`
| * add message to `assert` in `assert_enqueued_with`yuuji.yaginuma2014-09-231-1/+3
|/
* Active Job refactoringCristian Bica2014-09-031-33/+33
|
* [ActiveJob] TestCase (Will squash before merge)Abdelkader Boudih2014-09-021-3/+2
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-11/+9
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-0/+217