@@ -584,7 +584,7 @@ def test_assert_enqueued_with_failure
584
584
end
585
585
end
586
586
587
- assert_match ( / No enqueued job found with {: job=> NestedJob, : queue=> "low"}/ , error . message )
587
+ assert_match ( " No enqueued job found with #{ { job : NestedJob , queue : "low" } } " , error . message )
588
588
end
589
589
590
590
def test_assert_enqueued_with_with_no_block_failure
@@ -598,7 +598,7 @@ def test_assert_enqueued_with_with_no_block_failure
598
598
assert_enqueued_with ( job : NestedJob , queue : "low" )
599
599
end
600
600
601
- assert_match ( / No enqueued job found with {: job=> NestedJob, : queue=> "low"}/ , error . message )
601
+ assert_match ( " No enqueued job found with #{ { job : NestedJob , queue : "low" } } " , error . message )
602
602
end
603
603
604
604
def test_assert_enqueued_with_args
@@ -736,8 +736,8 @@ def test_assert_enqueued_with_failure_with_global_id_args
736
736
end
737
737
end
738
738
739
- assert_match ( / No enqueued job found with {: job=> HelloJob, : args=> \[ #{ wilma . inspect } \] }/ , error . message )
740
- assert_match ( /Potential matches: {.*?:job=>HelloJob, :args=> \[ #< Person.* @id="9"> \] , :queue=>"default".*?} / , error . message )
739
+ assert_match ( " No enqueued job found with #{ { job : HelloJob , args : [ wilma ] } } " , error . message )
740
+ assert_match ( /Potential matches:.* Person.* @id="9"/ , error . message )
741
741
end
742
742
743
743
def test_show_jobs_that_are_enqueued_when_job_is_not_queued_at_all
@@ -750,7 +750,7 @@ def test_show_jobs_that_are_enqueued_when_job_is_not_queued_at_all
750
750
end
751
751
end
752
752
753
- assert_match ( / No enqueued job found with {: job=> MultipleKwargsJob, : args=> \[ #{ wilma . inspect } \] }/ , error . message )
753
+ assert_match ( " No enqueued job found with #{ { job : MultipleKwargsJob , args : [ wilma ] } } " , error . message )
754
754
assert_match ( /No jobs of class MultipleKwargsJob were enqueued, job classes enqueued: HelloJob/ , error . message )
755
755
end
756
756
@@ -760,7 +760,7 @@ def test_shows_no_jobs_enqueued_when_there_are_no_jobs
760
760
end
761
761
end
762
762
763
- assert_match ( / No enqueued job found with {: job=> HelloJob, : args=> \[ \] }/ , error . message )
763
+ assert_match ( " No enqueued job found with #{ { job : HelloJob , args : [ ] } } " , error . message )
764
764
assert_match ( /No jobs were enqueued/ , error . message )
765
765
end
766
766
@@ -772,8 +772,8 @@ def test_assert_enqueued_with_failure_with_no_block_with_global_id_args
772
772
assert_enqueued_with ( job : HelloJob , args : [ wilma ] )
773
773
end
774
774
775
- assert_match ( / No enqueued job found with {: job=> HelloJob, : args=> \[ #{ wilma . inspect } \] }/ , error . message )
776
- assert_match ( /Potential matches: {.*?:job=> HelloJob, :args=> \[ #<Person.* @id="9">\] , :queue=>"default" .*?}/ , error . message )
775
+ assert_match ( " No enqueued job found with #{ { job : HelloJob , args : [ wilma ] } } " , error . message )
776
+ assert_match ( /Potential matches: {.*?HelloJob,.* \[ #<Person.* @id="9">\] .*?}/ , error . message )
777
777
end
778
778
779
779
def test_assert_enqueued_with_does_not_change_jobs_count
@@ -2027,8 +2027,8 @@ def test_assert_performed_with_failure_with_global_id_args
2027
2027
HelloJob . perform_later ( ricardo )
2028
2028
end
2029
2029
end
2030
- assert_match ( / No performed job found with {: job=> HelloJob, : args=> \[ #{ wilma . inspect } \] }/ , error . message )
2031
- assert_match ( /Potential matches: {.*?:job=>HelloJob, :args=> \[ #< Person.* @id="9"> \] , :queue=>"default".*?} / , error . message )
2030
+ assert_match ( " No performed job found with #{ { job : HelloJob , args : [ wilma ] } } " , error . message )
2031
+ assert_match ( /Potential matches:.* Person.* @id="9"/ , error . message )
2032
2032
end
2033
2033
2034
2034
def test_assert_performed_with_without_block_failure_with_global_id_args
@@ -2040,16 +2040,16 @@ def test_assert_performed_with_without_block_failure_with_global_id_args
2040
2040
assert_performed_with ( job : HelloJob , args : [ wilma ] )
2041
2041
end
2042
2042
2043
- assert_match ( / No performed job found with {: job=> HelloJob, : args=> \[ #{ wilma . inspect } \] }/ , error . message )
2044
- assert_match ( /Potential matches: {.*?:job=>HelloJob, :args=> \[ #< Person.* @id="9"> \] , :queue=>"default".*?} / , error . message )
2043
+ assert_match ( " No performed job found with #{ { job : HelloJob , args : [ wilma ] } } " , error . message )
2044
+ assert_match ( /Potential matches:.* Person.* @id="9"/ , error . message )
2045
2045
end
2046
2046
2047
2047
def test_assert_performed_says_no_jobs_performed
2048
2048
error = assert_raise ActiveSupport ::TestCase ::Assertion do
2049
2049
assert_performed_with ( job : HelloJob , args : [ ] )
2050
2050
end
2051
2051
2052
- assert_match ( / No performed job found with {: job=> HelloJob, : args=> \[ \] }/ , error . message )
2052
+ assert_match ( " No performed job found with #{ { job : HelloJob , args : [ ] } } " , error . message )
2053
2053
assert_match ( /No jobs were performed/ , error . message )
2054
2054
end
2055
2055
@@ -2062,7 +2062,7 @@ def test_assert_performed_when_not_matching_the_class_shows_alteratives
2062
2062
assert_performed_with ( job : MultipleKwargsJob , args : [ wilma ] )
2063
2063
end
2064
2064
2065
- assert_match ( /No performed job found with {:job=> MultipleKwargsJob, :args=> \[ #<Person.* @id=11>\] }/ , error . message )
2065
+ assert_match ( /No performed job found with .* MultipleKwargsJob.* \[ #<Person.* @id=11>\] }/ , error . message )
2066
2066
assert_match ( /No jobs of class MultipleKwargsJob were performed, job classes performed: HelloJob/ , error . message )
2067
2067
end
2068
2068
0 commit comments