在Rails中不能使用guard-minitest

时间:2016-09-09 22:11:03

标签: ruby-on-rails minitest guard

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

当我运行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'

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

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

我可以在何处以及如何正确配置以保护测试文件?

1 个答案:

答案 0 :(得分:0)

我猜这里的问题是在看块 你可以尝试设置这样的块:

checking /media/timecapsule/Music/01 Just Chill.mp3
[mp3 @ 0x7f0694005f20] Skipping 0 bytes of junk at 1318922.
dur is -9223372036854775808
duration is -653583619391