I start using MiniTest
in my Rails project.
When I run spring rake test
, the test works fine.
But I can't run the test by 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
I wrote the test file name directory to avoid regular expression failer.
The test file is in test/models/company_test.rb
.
Where and how can I configure properly to watch the test files by guard?
Run options: -n spec/apis/user_spec.rb --seed 22566
– RosemondeGuardfile
there is no config like that. – Abellspring: 'bundle exec spring rake test'
github.com/guard/guard-minitest/issues/… – RosemondeRun options: -n spec/apis/user_spec.rb --seed 4908
If I change directory namespec
tospec_temp
then works fine, but I want to keep the folder name. – Abell