1. 08 5月, 2015 1 次提交
  2. 05 5月, 2015 1 次提交
  3. 24 3月, 2015 1 次提交
  4. 08 2月, 2015 1 次提交
  5. 07 2月, 2015 1 次提交
    • M
      Add an `:only` option to `perform_enqueued_jobs` to filter jobs based on · e818f657
      Michael Ryan 提交于
      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.
      e818f657
  6. 31 1月, 2015 1 次提交
    • S
      Allow keyword arguments to work with ActiveJob · 31085a5c
      Sean Griffin 提交于
      Unfortunately, the HashWithIndifferent access approach is insufficient
      for our needs. It's perfectly reasonable to want to use keyword
      arguments with Active Job, which we will see as a symbol keyed hash. For
      Ruby to convert this back to keyword arguments, it must deserialize to a
      symbol keyed hash.
      
      There are two primary changes to the serialization behavior. We first
      treat a HWIA separately, and mark it as such so we can convert it back
      into a HWIA during deserialization.
      
      For normal hashes, we keep a list of all symbol keys, and convert them
      back to symbol keys after deserialization.
      
      Fixes #18741.
      31085a5c
  7. 10 1月, 2015 1 次提交
  8. 08 1月, 2015 2 次提交
  9. 01 1月, 2015 2 次提交
  10. 31 12月, 2014 1 次提交
  11. 29 11月, 2014 1 次提交