Skip to content
代码片段 群组 项目
未验证 提交 dcc2a2c4 编辑于 作者: Peter Leitzen's avatar Peter Leitzen
浏览文件

Improve failure message for unknown categories

上级 5fc363b7
No related branches found
No related tags found
无相关合并请求
......@@ -32,10 +32,21 @@
next unless used_category
next if used_category == :not_owned
[path, used_category] unless feature_categories.include?(used_category)
[klass, path, used_category] unless feature_categories.include?(used_category)
end.compact
expect(routes_unknown_category).to be_empty, "#{routes_unknown_category.first(10)} had an unknown category"
message = -> do
list = routes_unknown_category.map do |klass, path, category|
"- #{klass} (#{path}): #{category}"
end
<<~MESSAGE
Unknown categories found for:
#{list.join("\n")}
MESSAGE
end
expect(routes_unknown_category).to be_empty, message
end
# This is required for API::Base.path_for_app to work, as it picks
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册