kostya/eye — pull request #15 by paviensky (2013-09-15 12:58:09+00:00)
Title: allow deleting variables from environment

I have found a bug when I was trying to spawn a process with `bundle exec` from Eye that is also started by `bundle exec` but from different Ruby and with different set of gems. For this purpose the environment of spawned process should not contain `BUNDLE_*` and `RUBYOPT` (the very same thing that bundler does in `Bundler#with_clean_env` - https://github.com/bundler/bundler/blob/master/lib/bundler.rb#L220)

But when I tried to use `env "RUBYOPT" => nil` it just simply got ignored - I believe that there is wrong condition in the `prepare_env` method - it's not passing the `nil` variable to the `#spawn` method as it should but it simply ignores it.

I strongly believe that the original intention was to allow the `nil` values (there is actually no reason for the opposite) and it's also covered by a test, which unfortunately is not testing things properly. The offending line `r['C'].should == nil` is wrong as this line passes not only when 'C' is nil (which was probably purpose of this assertion) but also it successfully passes when the 'C' key is not present in the hash (which is the actual case).

And by the way - thanks for the great gem!