• É
    Fix perform_enqueued_jobs without a block with other helpers · f123e5e4
    Étienne Barrié 提交于
    assert_enqueued_with with a block ignores all the jobs enqueued before
    the block for its assertions by counting the number of jobs and dropping
    the n first elements from the Array, but since we're now mutating the
    Array in perform_enqueued_jobs without a block, it's broken.
    
    This uses another implementation which is correct when the array is
    mutated, by getting a duplicated array of jobs, then removing them from
    the original array.
    
    Similarly assert_enqueued_jobs with a block was using counts only, now
    keeps track of the specific jobs to count them at the end.
    f123e5e4
test_helper_test.rb 58.7 KB