We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f086e9 commit 0eb2bf1Copy full SHA for 0eb2bf1
test/lib/rails_stats/json_formatter_test.rb
@@ -88,7 +88,12 @@
88
calculator = RailsStats::StatsCalculator.new(root_directory)
89
formatter = RailsStats::JSONFormatter.new(calculator)
90
91
- assert_equal JSON.parse(JSON_STRING), formatter.result
+ sorted_expectation = JSON.parse(JSON_STRING).sort {|x, y| x["name"] <=> y["name"] }
92
+ sorted_result = formatter.result.sort {|x, y| x["name"] <=> y["name"] }
93
+
94
+ sorted_expectation.each_with_index do |x, i|
95
+ assert_equal x, sorted_result[i]
96
+ end
97
end
98
99
0 commit comments