File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 260
260
calculator = RailsStats ::StatsCalculator . new ( root_directory )
261
261
formatter = RailsStats ::JSONFormatter . new ( calculator )
262
262
263
- sorted_expectation = JSON . parse ( JSON_STRING )
264
- sorted_result = formatter . result
263
+ expectation = JSON . parse ( JSON_STRING )
264
+ result = formatter . result
265
265
266
- sorted_expectation . each_with_index do |x , i |
267
- assert_equal x , sorted_result [ i ]
266
+ expectation . each do |hash |
267
+ if hash [ "gems" ]
268
+ hash [ "gems" ] . each do |gem |
269
+ gem [ "transitive_dependencies" ] &.sort!
270
+ end
271
+ end
268
272
end
273
+
274
+ result . each do |hash |
275
+ if hash [ "gems" ]
276
+ hash [ "gems" ] . each do |gem |
277
+ gem [ "transitive_dependencies" ] &.sort!
278
+ end
279
+ end
280
+ end
281
+
282
+ assert_equal expectation , result
269
283
end
270
284
end
271
285
end
You can’t perform that action at this time.
0 commit comments