有没有什么现有的解决方案(最好是gem )可以用rspec来运行一些规范片段?
例如:
rspec . # runs whole test suite
rspec . --keywords=project # runs all specs that have "project" keyword there somewhere
或者类似的东西?
发布于 2011-02-15 21:49:57
您可以通过向describe、context或test提供键值对来使用rspec中的标记,如下所示:
describe "A set of tests", :constraint => 'slow'
describe "Another set of tests", :focus => true您可以通过执行以下操作来运行这些集:
rspec --tag constraint:slow
rspec --tag focus发布于 2011-04-13 18:37:47
我认为内置的"--example“选项可以完成您想要的操作:
rspec . --example "project"https://stackoverflow.com/questions/5004286
复制相似问题