@@ -372,20 +372,22 @@ def perform; raise StandardError; end
372372 } . to have_enqueued_job . with ( 42 , "David" )
373373 end
374374
375- it "fails if the arguments do not match the job's signature" do
376- expect {
375+ describe "verifying the arguments passed match the job's signature" do
376+ it "fails if there is an arity mismatch" do
377377 expect {
378- two_args_job . perform_later ( 1 )
379- } . to have_enqueued_job . with ( 1 )
380- } . to fail_with ( /Incorrect arguments passed to TwoArgsJob: Wrong number of arguments/ )
381- end
378+ expect {
379+ two_args_job . perform_later ( 1 )
380+ } . to have_enqueued_job . with ( 1 )
381+ } . to fail_with ( /Incorrect arguments passed to TwoArgsJob: Wrong number of arguments/ )
382+ end
382383
383- it "fails if the job's signature/arguments are mismatched keyword/positional arguments" do
384- expect {
384+ it "fails if there is a keyword/positional arguments mismatch" do
385385 expect {
386- keyword_args_job . perform_later ( 1 , 2 )
387- } . to have_enqueued_job . with ( 1 , 2 )
388- } . to fail_with ( /Incorrect arguments passed to KeywordArgsJob: Missing required keyword arguments/ )
386+ expect {
387+ keyword_args_job . perform_later ( 1 , 2 )
388+ } . to have_enqueued_job . with ( 1 , 2 )
389+ } . to fail_with ( /Incorrect arguments passed to KeywordArgsJob: Missing required keyword arguments/ )
390+ end
389391 end
390392
391393 it "passes with provided arguments containing global id object" do
@@ -521,20 +523,22 @@ def perform; raise StandardError; end
521523 } . to fail_with ( /expected to enqueue exactly 1 jobs, but enqueued 0/ )
522524 end
523525
524- it "fails if the arguments do not match the job's signature" do
525- two_args_job . perform_later ( 1 )
526+ describe "verifying the arguments passed match the job's signature" do
527+ it "fails if there is an arity mismatch" do
528+ two_args_job . perform_later ( 1 )
526529
527- expect {
528- expect ( two_args_job ) . to have_been_enqueued . with ( 1 )
529- } . to fail_with ( /Incorrect arguments passed to TwoArgsJob: Wrong number of arguments/ )
530- end
530+ expect {
531+ expect ( two_args_job ) . to have_been_enqueued . with ( 1 )
532+ } . to fail_with ( /Incorrect arguments passed to TwoArgsJob: Wrong number of arguments/ )
533+ end
531534
532- it "fails if the job's signature/arguments are mismatched keyword/positional arguments" do
533- keyword_args_job . perform_later ( 1 , 2 )
535+ it "fails if there is a keyword/positional arguments mismatch " do
536+ keyword_args_job . perform_later ( 1 , 2 )
534537
535- expect {
536- expect ( keyword_args_job ) . to have_been_enqueued . with ( 1 , 2 )
537- } . to fail_with ( /Incorrect arguments passed to KeywordArgsJob: Missing required keyword arguments/ )
538+ expect {
539+ expect ( keyword_args_job ) . to have_been_enqueued . with ( 1 , 2 )
540+ } . to fail_with ( /Incorrect arguments passed to KeywordArgsJob: Missing required keyword arguments/ )
541+ end
538542 end
539543
540544 it "fails when negated and several jobs enqueued" do
0 commit comments