guard / guard-spork

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

added support for passing in environments var's for cucumber and rspec #15

Closed michaelbearne closed 13 years ago

michaelbearne commented 13 years ago

I had a problem getting rails to picking up RAILS_ENV=cucumber and still using RAILS_ENV=test for rspec so I have added support to pass in env's for cucumber and rspec when forking.

thibaudgg commented 13 years ago

Looks great, can you just add some documentation about this new option in the README before I merge it. Thanks

rymai commented 13 years ago

Cool, be sure to correct "sprok_env" to "spork_env" ! ;)

michaelbearne commented 13 years ago

I think this is only going to work with 1.9.x not 1.8.7

http://www.ruby-doc.org/core-1.8.7/classes/Kernel.html#M001111 http://www.ruby-doc.org/core/classes/Kernel.html#M001438

I should of tested with 1.8.7 before sending pull request Looking into it now

michaelbearne commented 13 years ago

I have now tested on 1.8.7 the implementation is not as clean as exec has no support for passing in env. I have been testing this with a rails environment test for rspec with config.cache_classes = false and a cucumber environment with config.cache_classes = true

rymai commented 13 years ago

Ok, thanks I've merged this along with some code and specs cleanup! :)

Thank you Michael!