Added support for spec directory #3

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@mptre

mptre commented Jul 2, 2012

Allow specs being placed inside the spec directory.

@rmm5t

This comment has been minimized.

Show comment Hide comment
@rmm5t

rmm5t Sep 22, 2012

+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) })

rmm5t commented Sep 22, 2012

+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

This comment has been minimized.

Show comment Hide comment
@semaperepelitsa

semaperepelitsa Sep 25, 2012

Owner

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
Owner

semaperepelitsa commented Sep 25, 2012

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

This comment has been minimized.

Show comment Hide comment
@mptre

mptre Sep 25, 2012

Great feature, works like a charm!

mptre commented Sep 25, 2012

Great feature, works like a charm!

@mptre mptre closed this Sep 25, 2012

@rmm5t

This comment has been minimized.

Show comment Hide comment
@rmm5t

rmm5t Sep 25, 2012

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:

  • test/test_helper.rb - Probably the most common because of Test::Unit
  • test/minitest_helper.rb - introduced at least by rails-minitest so likely to become the new standard
  • spec/spec_helper.rb - Completely reasonable default for those that like minitest/spec.

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.

rmm5t commented Sep 25, 2012

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:

  • test/test_helper.rb - Probably the most common because of Test::Unit
  • test/minitest_helper.rb - introduced at least by rails-minitest so likely to become the new standard
  • spec/spec_helper.rb - Completely reasonable default for those that like minitest/spec.

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

This comment has been minimized.

Show comment Hide comment
@semaperepelitsa

semaperepelitsa Sep 26, 2012

Owner

Thanks for explaining, I think this is reasonable.

Owner

semaperepelitsa commented Sep 26, 2012

Thanks for explaining, I think this is reasonable.

@rmm5t

This comment has been minimized.

Show comment Hide comment
@rmm5t

rmm5t Sep 26, 2012

Great. Thanks!

rmm5t commented Sep 26, 2012

Great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment