Closed jottr closed 8 years ago
ruby -I"test" -I"spec" -r minitest/autorun -e ""
What if you run just that command instead of guard
?
$ ruby -I"test" -I"spec" -r minitest/autorun -e ""
#...
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
When I edit it as follows, the tests are run:
$ ruby -I"-r minitest/autorun -e " hamming_test.rb
# ...
15 runs, 0 assertions, 0 failures, 2 errors, 13 skips
$ tree
.
├── Guardfile
├── README.md
├── hamming.rb
└── hamming_test.rb
0 directories, 4 files
The files have to be within directories specified with the test_folders
option.
Your file hamming_test.rb
is neither in spec
nor test
, so it's ignored.
See: https://github.com/guard/guard-minitest#test_folders-and-test_file_patterns
I'd suggest just moving hamming_test.rb
to a test
subdirectory.
And change the watches to handle this.
Thx for the info. Instead of moving the files, I did:
guard :minitest, test_folders: './', test_file_patterns: '*_test.rb' do
which made more sense in my particular case.
BUT: