semaperepelitsa / spork-minitest

MiniTest runner for Spork
MIT License
13 stars 25 forks source link

Added support for spec directory #3

Closed mptre closed 12 years ago

mptre commented 12 years ago

Allow specs being placed inside the spec directory.

rmm5t commented 12 years ago

+1 I'd also like to see support added for sniffing test/minitest_helper.rb too

HELPER_FILE = File.join(Dir.pwd, %w[spec/spec_helper.rb test/test_helper.rb test/minitest_helper.rb].find { |f| File.exists?(f) })
semaperepelitsa commented 12 years ago

Sorry for the long delay! I don't like the idea of keeping the list of everyone's test helpers here. In spork-minitest 1.0.0.beta1 you can now specify custom helper file in environment variable when starting spork. Can you give this a try?

HELPER_FILE=spec/spec_helper.rb spork minitest
mptre commented 12 years ago

Great feature, works like a charm!

rmm5t commented 12 years ago

This works well enough, and I was able to add an ENV snippet to my Guardfile to help initialize this, but I would like to point out that it seems much more friendly to stick with a lookup against the the 3 helper file naming conventions that are out there for minitest. I think it is also good that there is now HELPER_FILE env override, but the following helper files are fairly standard at this point:

Having a set of default lookups isn't a bad thing. It makes things easier while getting a system setup. While, I'm glad the HELPER_FILE override is there, I'd still like to see a lookup against the remaining helper file naming conventions.

semaperepelitsa commented 12 years ago

Thanks for explaining, I think this is reasonable.

rmm5t commented 12 years ago

Great. Thanks!