(Rspec技巧)指定Rspec测试文件

1 只测试匹配到的字符串涉及的specs
rspec -e  expect(page).to have_content

2 只测试指定文件
rspec spec/requests/static_pages_spec.rb

3 指定文件并指定字符串
rspec spec/requests/static_pages_spec.rb  -e expect(page).to have_content

原文地址:https://www.cnblogs.com/leaf526/p/3600671.html