guard / guard-spork

Guard::Spork automatically manage Spork DRb servers
https://rubygems.org/gems/guard-spork
MIT License
296 stars 58 forks source link

Allows :test_unit to also be used if it finds spec/minispec_helper.rb #69

Closed arronmabrey closed 12 years ago

arronmabrey commented 12 years ago

Allows :test_unit to also be used if it finds spec/minispec_helper.rb

I also have a pull request on spork-testunit that also supports the spec/minispec_helper.rb convention https://github.com/sporkrb/spork-testunit/pull/44

Used by people who like the Spec DSL of MiniTest and want their tests in the spec directory.

thibaudgg commented 12 years ago

Can you please add some specs, thanks!

arronmabrey commented 12 years ago

To be honest I would but I'm just getting into testing now (hence setting up my env and fixing this) and I'm not totally sure how to go about it or what really needs to be under test.

thibaudgg commented 12 years ago

Have a look to already existing specs relative to that. It should be easy enough to update them.

arronmabrey commented 12 years ago

That was not bad at all. I guess it helps that you have really clean tests to begin with.

thibaudgg commented 12 years ago

Just add context "with MiniTest only" do and it will be perfect! :)

arronmabrey commented 12 years ago

I tried that and the tests failed I think it has something to do with having the || operator in detect_test_unit

def detect_test_unit
  File.exist?("spec/minispec_helper.rb") || File.exist?("test/test_helper.rb")
end

I could be wrong but It looks like we would need to add support throughout for a new :minitest_spec testing framework. I was trying to get around that by piggy backing on :test_unit to avoid duplication of identical options like port and what not.

Then again I'm not super familiar with the code base maybe their is a simpler way.

thibaudgg commented 12 years ago

I'm not familiar with MiniTest::Spec too, but yeah maybe adding a new :minitest_spec is the solution.