ruby-on-rails – 无法在Rails中使用guard-minitest

我开始在我的Rails项目中使用MiniTest.

当我进行弹簧耙试验时,测试工作正常.
但是我无法通过守卫 – 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'

Guardfile

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

我写了测试文件名目录,以避免正则表达式failer.
测试文件位于test / models / company_test.rb中.

我可以在何处以及如何正确配置以通过防护来查看测试文件

解决方法

我想这里的问题是在看块
你能尝试设置这样的块:
guard 'minitest',cmd: 'spring rake test' do
  watch('company.rb') { 'company_test.rb' }
  watch('company_test.rb')
enв

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...