- 06 10月, 2018 1 次提交
-
-
由 Alan Wu 提交于
Using `included` to define `attr_acessor` and `attr_writer` is causing these methods to not show up in the documentation.
-
- 29 9月, 2018 2 次提交
-
-
由 Yasuo Honda 提交于
Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'
-
由 Mohit Natoo 提交于
* Documentation clarity in ActiveJob::TestHelper [ci skip] * Documentation for options [Mohit Natoo + Rafael Mendonça França]
-
- 27 9月, 2018 1 次提交
-
-
由 Edouard CHIN 提交于
- When calling `assert_performed_with`/`assert_enqueued_with`, the +args+ needs to match exactly what the job get passed. Some jobs can have lot of arguments, or even a simple hash argument has many key. This is not convenient to test as most tests doesn't need to check if the arguments matches perfectly. This PR make it possible to only check if a subset of arguments were passed to the job.
-
- 24 9月, 2018 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Similar to Action View's and Action Controller's instrument helpers.
-
- 22 9月, 2018 1 次提交
-
-
由 yuuji.yaginuma 提交于
-
- 21 9月, 2018 1 次提交
-
-
由 Sharang Dashputre 提交于
The test helpers now treat `{ a: 1, b: 2 }` and `{ b: 2, a: 1 }` as equals
-
- 16 9月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Also this commit removes `:wait` from payload of `retry_stopped.active_job`. Related to https://github.com/rails/rails/pull/33751#discussion_r214140008 Follow up #33751 /cc @kaspth, @rafaelfranca
-
- 14 9月, 2018 1 次提交
-
-
由 Sharang Dashputre 提交于
Fix typo `Instrinsic` -> `Intrinsic`
-
- 13 9月, 2018 1 次提交
-
-
由 Ricardo Díaz 提交于
As @dhh brings up, the point of `ActionDispatch::IntegrationTest` is to allow users to test the integration of all the pieces called by a controller. Asserting about the emails and jobs queued is part of that task. This commit includes the `ActionMailer::TestHelper` and `ActiveJob::TestHelper` modules when the ActionMailer and ActiveJob railties are initialized respectively.
-
- 09 9月, 2018 1 次提交
-
-
由 Graham Turner 提交于
-
- 08 9月, 2018 1 次提交
-
-
由 stoodfarback 提交于
The priority wasn't being passed from ActiveJob to Backburner, despite priority being supported. This also brings it inline with the docs, which mark Backburner as supporting priorities in the "Backend Features" table: https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html
-
- 31 8月, 2018 1 次提交
-
-
由 Steve S 提交于
-
- 30 8月, 2018 1 次提交
-
-
由 Steve S 提交于
-
- 27 8月, 2018 1 次提交
-
-
由 Kevin Deisz 提交于
-
- 25 8月, 2018 1 次提交
-
-
由 Kevin Deisz 提交于
-
- 20 8月, 2018 8 次提交
-
-
由 bogdanvlviv 提交于
-
由 bogdanvlviv 提交于
-
由 bogdanvlviv 提交于
Example: ``` def test_assert_performed_with MyJob.perform_later(1,2,3) perform_enqueued_jobs assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high') end ``` Follow up #33626.
-
由 bogdanvlviv 提交于
Execution of `assert_performed_jobs`, and `assert_no_performed_jobs` without a block should respect passed `:except`, `:only`, and `:queue` options.
-
由 bogdanvlviv 提交于
If the `:queue` option is specified, then only the job(s) enqueued to a specific queue will not be performed. Example: ``` def test_assert_no_performed_jobs_with_queue_option assert_no_performed_jobs queue: :some_queue do HelloJob.set(queue: :other_queue).perform_later("jeremy") end end ```
-
由 bogdanvlviv 提交于
If the `:queue` option is specified, then only the job(s) enqueued to a specific queue will be performed. Example: ``` def test_assert_performed_jobs_with_queue_option assert_performed_jobs 1, queue: :some_queue do HelloJob.set(queue: :some_queue).perform_later("jeremy") HelloJob.set(queue: :other_queue).perform_later("bogdan") end end ```
-
由 bogdanvlviv 提交于
Set ```` queue_adapter.perform_enqueued_jobs = true queue_adapter.perform_enqueued_at_jobs = true queue_adapter.filter = only queue_adapter.reject = except queue_adapter.queue = queue ``` if block given. Execution of `flush_enqueued_jobs` doesn't require that.
-
由 bogdanvlviv 提交于
If the `:queue` option is specified, then only the job(s) enqueued to a specific queue will be performed. Example: ``` def test_perform_enqueued_jobs_with_queue perform_enqueued_jobs queue: :some_queue do MyJob.set(queue: :some_queue).perform_later(1, 2, 3) # will be performed HelloJob.set(queue: :other_queue).perform_later(1, 2, 3) # will not be performed end assert_performed_jobs 1 end ``` Follow up #33265 [bogdanvlviv & Jeremy Daer]
-
- 18 8月, 2018 1 次提交
-
-
由 yuuji.yaginuma 提交于
Currently, the execution count increments after deserializes arguments. Therefore, if an error occurs with deserialize, it retries indefinitely. In order to prevent this, the count is moved before deserialize. Fixes #33344.
-
- 16 8月, 2018 2 次提交
-
-
由 bogdanvlviv 提交于
Follow up #33626
-
由 Kevin Deisz 提交于
Performs all of the jobs that have been enqueued up to this point in the test.
-
- 10 8月, 2018 1 次提交
-
-
由 Mohit Natoo 提交于
-
- 09 8月, 2018 1 次提交
-
-
由 Mohit Natoo 提交于
-
- 24 7月, 2018 1 次提交
-
-
由 Paul McMahon 提交于
http links will be redirected to the https version, but still better to just directly link to the https version.
-
- 21 7月, 2018 1 次提交
-
-
由 Kasper Timm Hansen 提交于
-
- 18 7月, 2018 1 次提交
-
-
由 zvkemp 提交于
-
- 03 7月, 2018 1 次提交
-
-
由 alpaca-tc 提交于
-
- 01 7月, 2018 1 次提交
-
-
由 Kasper Timm Hansen 提交于
It breaks Active Job when run in isolation. E.g. bin/test test/cases/logging_test.rb: https://travis-ci.org/rails/rails/jobs/398779028 Consider Rafaels suggestion of reviewing the eager loading instead: https://github.com/rails/rails/pull/33234#issuecomment-401027419 This reverts commit cb0fdaac, reversing changes made to a0a1abb3.
-
- 30 6月, 2018 2 次提交
-
-
由 bogdanvlviv 提交于
It can be asserted that no jobs are enqueued to a specific queue: ```ruby def test_no_logging assert_no_enqueued_jobs queue: 'default' do LoggingJob.set(queue: :some_queue).perform_later end end ```
-
由 bogdanvlviv 提交于
Rename `in_block_job` to `enqueued_job` since this variable can refer not only to jobs that were created in the block. See #33258. Return back accidentally removed test to activejob/test/cases/test_helper_test.rb See #33258. Fix name of tests.
-
- 29 6月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Example of `assert_enqueued_with` with no block ```ruby 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 ``` Example of `assert_enqueued_email_with` with no block: ```ruby def test_email ContactMailer.welcome.deliver_later assert_enqueued_email_with ContactMailer, :welcome end def test_email_with_arguments ContactMailer.welcome("Hello", "Goodbye").deliver_later assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] end ``` Related to #33243
-
- 28 6月, 2018 2 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 9d6bbf4e, reversing changes made to 5a1ea090. This method only works with block.
-
由 Marcus Ilgner 提交于
The documentation for assert_enqueued_email_with states that it's supposed to work without a block yet it calls assert_enqueued_with which doesn't check whether a block was passed before calling `yield`
-
- 27 6月, 2018 1 次提交
-
-
由 alpaca-tc 提交于
-