File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class BenchmarkTypeTest < ActiveSupport::TestCase
3333 groups . first . benchmark_types << benchmark_types . first ( 3 )
3434 groups . second . benchmark_types << benchmark_types . last ( 3 )
3535
36- assert_equal benchmark_types . first . comparison_benchmark_types . to_a , benchmark_types [ 1 ..2 ]
37- assert_equal benchmark_types . third . comparison_benchmark_types . to_a , benchmark_types . first ( 2 ) + benchmark_types . last ( 2 )
36+ assert_matched_arrays benchmark_types . first . comparison_benchmark_types , benchmark_types [ 1 ..2 ]
37+ assert_matched_arrays benchmark_types . third . comparison_benchmark_types , benchmark_types . first ( 2 ) + benchmark_types . last ( 2 )
3838 end
3939end
Original file line number Diff line number Diff line change @@ -14,3 +14,13 @@ class ActiveSupport::TestCase
1414end
1515
1616Sidekiq ::Testing . fake!
17+
18+ module MiniTest ::Assertions
19+ def assert_matched_arrays ( expected , actual )
20+ expected_array = expected . to_ary
21+ assert_kind_of Array , expected_array
22+ actual_array = actual . to_ary
23+ assert_kind_of Array , actual_array
24+ assert_equal expected_array . sort , actual_array . sort
25+ end
26+ end
You can’t perform that action at this time.
0 commit comments