测试框架的目录是否可以/应该合并到顶级目录(lavendor/plugins)?
出于某种原因,我发现每个测试框架(rspec、test::unit、cucumber 等)的文件都位于我的应用程序顶层的单独文件夹中,这真的很烦人。这些目录应该分散而不是像供应商目录中的 gems/plugins 那样合并,是否有充分的理由?
如果没有实际原因,那么将这些目录合并到顶级“测试”目录中是否合理,其中包含每个测试框架的子目录以及固定数据等?有没有其他人曾经被这个逼疯过(也许已经拼凑出一种快速简单的方法来更新必要的路径以使其发挥作用)?
For some reason, I find it really irksome that the files for each testing framework (rspec, test::unit, cucumber, etc.) live in a separate folder in the top level of my app. Is there a strong reason these directories should be scattered about instead of consolidated like gems/plugins in the vendor directory?
If there isn't an actual reason for the way it is, would it be kosher to consolidate these directories into a top-level "test" directory, containing subdirectories for each of the testing frameworks alongside fixture data, etc.? Has anyone else ever been driven bonkers this (and maybe already hacked together a quick'n'easy way of updating the necessary paths to get this to work)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我个人会欢迎这一改变。
就我个人而言,我同时使用 RSpec 和 Cucumber,并且我很纠结是否将这些装置放在 features/support/fixtures 目录(我自己创建)或 spec/fixtures 中。如果我在功能和规格测试中也使用这个夹具会怎样?! [过于情绪化]为什么没有人想到这些固定装置!!
当然。顶级测试目录,其中包含 features、specs、fixtures 子目录以及您需要的任何其他内容。
好问题!
I for one would welcome this change.
Personally I use RSpec and Cucumber at the same time and I'm torn whether or not to put the fixtures in the features/support/fixtures directory (I create it myself) or spec/fixtures. What if I use this fixture in features and in spec tests too?! [overly emotional] Why won't somebody think of the fixtures!!
Definitely. A top-level test directory with the subdirectories of features, specs, fixtures and whatever else you need.
Great question!