iro*_*and 8 ruby-on-rails guard minitest
我开始MiniTest在我的Rails项目中使用.
当我跑步时spring rake test,测试工作正常.但我无法通过测试guard-minitest.
bundle exec guard
05:03:24 - INFO - Guard::Minitest 2.4.6 is running, with Minitest::Unit 5.9.0!
05:03:24 - INFO - Running: all tests
Run options: -n spec/apis/user_spec.rb --seed 22566
# Running:
Finished in 0.004998s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
05:03:25 - INFO - Guard is now watching at '/Users/ironsand/dev/my_project'
Run Code Online (Sandbox Code Playgroud)
guard :minitest, spring: 'spring rake test' do
watch(%r{^test/models/company_test.rb$})
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb$}) { 'test' }
end
Run Code Online (Sandbox Code Playgroud)
我编写了测试文件名目录以避免正则表达式failer.测试文件在test/models/company_test.rb.
我可以在何处以及如何正确配置以通过防护来查看测试文件?
我猜这里的问题出在监视块中\n您可以尝试这样设置块吗:
\n\nguard 'minitest', cmd: 'spring rake test' do\n watch('company.rb') { 'company_test.rb' }\n watch('company_test.rb')\nen\xd0\xb2\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
212 次 |
| 最近记录: |